Recently, I decided to type in some short BASIC programs for my Commodore VIC-20. To be fair, I haven’t written any code for the VIC-20 (or C64) in quite a few years. I quickly found myself hitting the wrong keys on the keyboard (e.g., @ instead of double quote, etc.). What I also quickly realized is just how many of the special screen control codes I had forgotten (almost all of them!).
Screen Control Characters
Screen control characters (not sure if this is the technical term or not) are a way of controlling cursor movement and text color on the screen by inserting special characters into your BASIC PRINT statements.
For example, the following line will clear the screen and print “Hello!” in purple text:
To the non-initiated, the first two characters after the initial double quotation mark might look a bit strange. However, the VIC-20 (and C64) interprets the heart character as a “clear screen” command and the next character as a “switch to purple text” command.
While these commands can be found in various Commodore user guides, I decided to put together a quick cheat sheet to keep handy as I regain some familiarity with these special characters. In the spirit of sharing, I am also making the cheat sheet available here.
Commodore VIC-20
Here are the print screen codes for the VIC-20.
Commodore 64
Here are the print screen codes for the Commodore 64. These are identical to the VIC-20 codes above with an additional eight color codes being added.
PDF Document
Finally, if you prefer a simple PDF document, you can download one here.
If I’ve missed anything, please let me know in the comments below.
Thanks!