From c5150ee31f07208422f1435de9b35a0d0168cbb5 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Thu, 9 Apr 2020 02:06:50 -0400 Subject: Completely changed the assembler. It now has a lexer/tokenizer, along with a parser. I have also made the emulator even smaller. --- test/lex.s | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 test/lex.s (limited to 'test/lex.s') diff --git a/test/lex.s b/test/lex.s new file mode 100644 index 0000000..543a3d8 --- /dev/null +++ b/test/lex.s @@ -0,0 +1,40 @@ +; aaaaaaaaaaaaaaaaa +SYM = $10 +SYM1 = 10 +SYM2 = %00000010 +.org $A000 +; String Literals/Constants. +tok: + .byte "dab" +msg: + .byte "oof, you divided a, and b on me.\n" +string: + .byte "Please, type something.\n" +string2: + .byte "You typed, " +.org $1000 +lex: + .byte $0 +.org $2000 +lex2: + .qword lex +cmd_buf: + .word $0 + +.org $8000 +reset: + cps ; cool, and eboc + lda #SYM ; nice symbols + sta lex ; great label + sta (lex2), y ; the pointers are cia niggers + sta (lex2, x) ; >mfw pointer to array is accessed as a pointer array + sta (lex2) ; normal pointer + sta lex, y ; arrays are good + sta lex, x ; same with this one + sta $1000 ; lol + lda.w #cmd_buf+8; + +a +.org $A000 +v +q -- cgit v1.2.3-13-gbd6f