Updated example with hex escape
This commit is contained in:
parent
220043a895
commit
6f30327420
|
@ -14,7 +14,7 @@ start:
|
||||||
end:
|
end:
|
||||||
tx
|
tx
|
||||||
hello_string:
|
hello_string:
|
||||||
.db "Hello,\x20world\n", 0
|
.db "Hello, w\x6frld\n", 0
|
||||||
hello_string_end:
|
hello_string_end:
|
||||||
.db 42, "hi", 43
|
.db 42, "hi", 43
|
||||||
; TODO .db 'H', 'e', 'l', 'l', 'o', '\0'
|
; TODO .db 'H', 'e', 'l', 'l', 'o', '\0'
|
||||||
|
|
|
@ -91,7 +91,7 @@ AsmError assemble_directive(char *input, size_t len, ByteVec *out, Token *tok) {
|
||||||
size_t pos = tok->start;
|
size_t pos = tok->start;
|
||||||
char byte0 = input[pos];
|
char byte0 = input[pos];
|
||||||
char byte1 = input[pos + 1];
|
char byte1 = input[pos + 1];
|
||||||
if (byte0 == 'd') {
|
if (tok->len == 0 && byte0 == 'd') {
|
||||||
size_t word_size;
|
size_t word_size;
|
||||||
switch (byte1) {
|
switch (byte1) {
|
||||||
case 'b':
|
case 'b':
|
||||||
|
|
Loading…
Reference in a new issue