Updated example with hex escape

This commit is contained in:
Igor M 2024-03-17 13:02:07 +02:00
parent 220043a895
commit 6f30327420
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ start:
end:
tx
hello_string:
.db "Hello,\x20world\n", 0
.db "Hello, w\x6frld\n", 0
hello_string_end:
.db 42, "hi", 43
; TODO .db 'H', 'e', 'l', 'l', 'o', '\0'

View file

@ -91,7 +91,7 @@ AsmError assemble_directive(char *input, size_t len, ByteVec *out, Token *tok) {
size_t pos = tok->start;
char byte0 = input[pos];
char byte1 = input[pos + 1];
if (byte0 == 'd') {
if (tok->len == 0 && byte0 == 'd') {
size_t word_size;
switch (byte1) {
case 'b':