summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2020-05-09 14:14:08 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2020-05-09 14:14:08 -0400
commit545bb8591e8003912b6c6b494acefd74e6b3abfd (patch)
treec290a49fc4fff8f15c092a2440576f5f1627b6d1 /test
parent11c8d71babb0210d070dd6ab12a255a5fa3159a5 (diff)
Added support for single quote marks to the emulator's
assembler. Single quote marks works in the assembler just like they do in C, except that it only supports a handful of escaped characters, like '\n', and '\r'.
Diffstat (limited to 'test')
-rw-r--r--test/lex.s13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/lex.s b/test/lex.s
index 543a3d8..037ce2b 100644
--- a/test/lex.s
+++ b/test/lex.s
@@ -1,7 +1,9 @@
; aaaaaaaaaaaaaaaaa
+
SYM = $10
SYM1 = 10
SYM2 = %00000010
+
.org $A000
; String Literals/Constants.
tok:
@@ -12,6 +14,7 @@ string:
.byte "Please, type something.\n"
string2:
.byte "You typed, "
+
.org $1000
lex:
.byte $0
@@ -33,8 +36,16 @@ reset:
sta lex, x ; same with this one
sta $1000 ; lol
lda.w #cmd_buf+8;
+ lda 'a' ; cool.
+ lda ' ' ; cool.
+ lda '\n' ; cool.
+ lda '\r' ; cool.
+ lda '\b' ; cool.
+ lda '\\' ; cool.
+ lda '\'' ; cool.
+l
a
-.org $A000
+.org $8000
v
q