More info on string literals

simon987 2020-07-30 19:03:26 -04:00
parent b50ab7a9ad
commit 07bba2229a

@ -95,16 +95,19 @@ mynumber: DW 0x0000
### String literals
You can use the `DW` to store strings, for example:
```asm
my_str: DW "Hello"
; This is assembled to:
; 00 48 00 65 00 6C 00 6C 00 6F
.text
MOV A, [my_str] ; Value of A is now 'H'
```
### Character literals
// NOT IMPLEMENTED
Java escape sequences are handled (`\u0000`, `\"`. `\0` `\t` etc) and strings are encoded to 16-bit big endian.
You can combine any type of literal values in a single line, for example: