This takes me back a few years. I spent HOURS writing BASIC programs to analyze other BASIC programs as a kid. My favourite PET trick was to hide the basic source by putting a comment (REM statement) at the beginning and end of the program. Then POKEing the address of the ending comment in the "next line" link in the first line. It turns out that when the interpreter was running the program, it didn't use the "next line" link, it just assumed the bytes following the current line were the beginning of the next line. But the LIST command //did// use the link. So you could get a program to run perfectly fine, but when someone did a LIST, the only thing they saw were the two comments.
I can't remember if this worked on the C64, but it worked on the 4016 and 4032's in our high school's computer lab.
Why do I remember that every C64 BASIC keyword was a 2-byte integer? A typing shortcut was to enter the first letter, followed by a "shifted" high-bit character. Every keyword was represented that way.
Variables were also 2-bytes, but ASCII. The user could enter a longer name, but only the first two characters were significant.
2 comments
[ 5.0 ms ] story [ 12.8 ms ] threadI can't remember if this worked on the C64, but it worked on the 4016 and 4032's in our high school's computer lab.
Variables were also 2-bytes, but ASCII. The user could enter a longer name, but only the first two characters were significant.