From 3e3c4895badaa04d6c243c9a282008cfcd7a4170 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 5 Mar 2025 04:24:28 -0500 Subject: AMSB.txt: add crunching setion. --- AMSB.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'AMSB.txt') diff --git a/AMSB.txt b/AMSB.txt index 0d458a7..158bc0c 100644 --- a/AMSB.txt +++ b/AMSB.txt @@ -306,3 +306,22 @@ in tokenized form. AMSB will LOAD it with no problems. If you hex-edit a SAVEd file to create a longer line, AMSB will accept that, too... up to 255 bytes. At 256 bytes, AMSB will lock up after LOAD. + + +Crunching +--------- + +AMSB stores spaces in the tokenized program, just like other 8-bit +MS BASICs do, but it requires you to put spaces between keywords and +variables (unlike e.g. Commodore 64 BASIC). This seems to be because +AMSB allows keywords inside of variable names: you can have a variable +called LIFE (which contains the keyword IF) in AMSB, but you can't in +C=64 BASIC (which gives a syntax error becase it sees "L IF E"). + +This applies to numbers, too: POKE710,0 is a syntax error in +AMSB. This is because POKE710 is actually a valid variable name: try +POKE710=123 followed by PRINT POKE710. + +However. The spaces aren't needed when the program is RUN. It would be +possible to remove all the spaces outside of strings or comments and +the program would still work fine. -- cgit v1.2.3