4 ms·
C64 basic was tokenized into one byte, with the most significant bit set: https://www.c64-wiki.com/wiki/BASIC_token https://www.c64-wiki.com/wiki/BASIC_token E
by egypturnash 2y ago
C64 basic was tokenized into one byte, with the most significant bit set: https://www.c64-wiki.com/wiki/BASIC_token https://www.c64-wiki.com/wiki/BASIC_token
Each command could be typed in two ways: the full name, or the first two letters, with the second capitalized. Plus a few exceptions like "?" turning into the PRINT token ($99, nowhere near the PETSCII value for ?) and π becoming $FF.
The tokens were expanded into full text strings when you would LIST the program. Which was always amusing if you had a very dense multi-statement line that expanded as longer than the 80 characters the c64's tokenizer routine could handle, you'd have to go back and replace some or all commands with the short form before you could edit it.
- mkesper 2y agoAs far as I remember you couldn't even run these programs after listing anymore.
- LocalH 2y agoYou could run them just fine as long as you didn't try to edit the listed lines if they were longer than two screen lines. The same is true for a C128 in C128 mode, except the limit is extended to 160 characters (four 40-column lines).
- vrighter 2y agothe zx spectrum did this too, except you could only type the "short forms" (which were always rendered in full). It had keywords on its keys. I.e. to type print, you had to press the "print" key.