From 8fc7ef9edec1dfd2514bc7d3480cee324193d075 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 22 Jun 2018 12:25:22 -0400 Subject: [PATCH] asoft-utils: the token is TAB( not TAB broke trying to tokenize/detokenize the rainbow.bas demo --- asoft_basic-utils/asoft_detoken.c | 2 +- asoft_basic-utils/tokenize_asoft.c | 2 +- linker_scripts/apple2_300.inc | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 linker_scripts/apple2_300.inc diff --git a/asoft_basic-utils/asoft_detoken.c b/asoft_basic-utils/asoft_detoken.c index fc96a77d..8048b324 100644 --- a/asoft_basic-utils/asoft_detoken.c +++ b/asoft_basic-utils/asoft_detoken.c @@ -17,7 +17,7 @@ char applesoft_tokens[][8]={ /* A8 */ "STORE","SPEED=","LET","GOTO","RUN","IF","RESTORE","&", /* B0 */ "GOSUB","RETURN","REM","STOP","ON","WAIT","LOAD","SAVE", /* B8 */ "DEF FN","POKE","PRINT","CONT","LIST","CLEAR","GET","NEW", -/* C0 */ "TAB","TO","FN","SPC(","THEN","AT","NOT","STEP", +/* C0 */ "TAB(","TO","FN","SPC(","THEN","AT","NOT","STEP", /* C8 */ "+","-","*","/","^","AND","OR",">", /* D0 */ "=","<","SGN","INT","ABS","USR","FRE","SCRN (", /* D8 */ "PDL","POS","SQR","RND","LOG","EXP","COS","SIN", diff --git a/asoft_basic-utils/tokenize_asoft.c b/asoft_basic-utils/tokenize_asoft.c index 2f8d5dfe..81dedb05 100644 --- a/asoft_basic-utils/tokenize_asoft.c +++ b/asoft_basic-utils/tokenize_asoft.c @@ -36,7 +36,7 @@ char applesoft_tokens[][8]={ /* A8 */ "STORE","SPEED=","LET","GOTO","RUN","IF","RESTORE","&", /* B0 */ "GOSUB","RETURN","REM","STOP","ON","WAIT","LOAD","SAVE", /* B8 */ "DEF FN","POKE","PRINT","CONT","LIST","CLEAR","GET","NEW", -/* C0 */ "TAB","TO","FN","SPC(","THEN","AT","NOT","STEP", +/* C0 */ "TAB(","TO","FN","SPC(","THEN","AT","NOT","STEP", /* C8 */ "+","-","*","/","^","AND","OR",">", /* D0 */ "=","<","SGN","INT","ABS","USR","FRE","SCRN (", /* D8 */ "PDL","POS","SQR","RND","LOG","EXP","COS","SIN", diff --git a/linker_scripts/apple2_300.inc b/linker_scripts/apple2_300.inc new file mode 100644 index 00000000..27e3a18a --- /dev/null +++ b/linker_scripts/apple2_300.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $300, size = $8E00, file = %O; +} + +SEGMENTS { +CODE: load = RAM, type = ro, align = $100; +RODATA: load = RAM, type = ro; +DATA: load = RAM, type = rw; +BSS: load = RAM, type = bss, define = yes; +ZEROPAGE: load = ZP, type = zp; +}