mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-19 18:46:43 +00:00
Document string literals
parent
ca6420adc4
commit
b50ab7a9ad
@ -92,6 +92,27 @@ mynumber: DW 0x0000
|
|||||||
;; use [] to reference the contents of the memory
|
;; use [] to reference the contents of the memory
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### String literals
|
||||||
|
|
||||||
|
```asm
|
||||||
|
my_str: DW "Hello"
|
||||||
|
|
||||||
|
.text
|
||||||
|
MOV A, [my_str] ; Value of A is now 'H'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Character literals
|
||||||
|
// NOT IMPLEMENTED
|
||||||
|
|
||||||
|
|
||||||
|
You can combine any type of literal values in a single line, for example:
|
||||||
|
|
||||||
|
```asm
|
||||||
|
DW "some string", 123, "another string", 0
|
||||||
|
```
|
||||||
|
|
||||||
## DUP
|
## DUP
|
||||||
The `DUP` directive (Duplicate) is used as operand for the `DW` directive. The syntax:
|
The `DUP` directive (Duplicate) is used as operand for the `DW` directive. The syntax:
|
||||||
```s
|
```s
|
||||||
@ -104,11 +125,6 @@ It can only be used in combination with the `DW` directive
|
|||||||
## Sections
|
## Sections
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
## Strings
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
## Characters
|
|
||||||
// NOT IMPLEMENTED
|
|
||||||
|
|
||||||
## ORG
|
## ORG
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user