From 545bb8591e8003912b6c6b494acefd74e6b3abfd Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sat, 9 May 2020 14:14:08 -0400 Subject: 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'. --- test/lex.s | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'test') 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 -- cgit v1.2.3-13-gbd6f