diff --git a/Assembler-directives.md b/Assembler-directives.md index 8ba3993..d94af00 100644 --- a/Assembler-directives.md +++ b/Assembler-directives.md @@ -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: