Mode Shifting And Automatic Tape RUN For Commodore
I seem to remember reading of a POKE that allows the use of upper- and lowercase with the use of the shift key, but can't find it in the Programmer's Reference Guide, the VIC-20 User's Manual, or COMPUTE!'s First Book of VIC. Could you tell me what this POKE is? Also, how do I make my taped programs run after being LOADed without my intervention?
Tim S. Hallen
There are a number of ways that you can place the VIC-20 or the Commodore 64 into the upper/lowercase or "text" mode. Using a POKE, the locations are 36869 on the VIC, and 53272 on the 64. These locations are on the VIC (Video Interface Chip) chip of each machine, and tell the computer where to get its character set. On the VIC, the normal value is 240, and on the 64 it's 21. To place the VIC into the text mode, POKE 36869,242 and for the 64, POKE 53272,23. To return to uppercase/full graphics (normal) mode, POKE 36869,240 on the VIC, and POKE 53272,21 on the 64.
There are other methods which switch between text and normal modes. One of these is to hold down the COMMODORE and SHIFT keys. To switch to text mode, press and continue to hold the COMMODORE key while pressing the SHIFT key. To return to normal, simply toggle the keys again. Another method, and probably the safest and most efficient, is via the PRINT command. To switch to text mode, type PRINT CHR$(14) then press RETURN. To return to normal mode, type PRINT CHR$(142). These PRINT statements can also be used within a program if you wish.
There are a number of ways to make the computer automatically run your programs after LOADing. The easiest is via the keys on the keyboard. After positioning your tape cassette to the beginning of the program you wish to LOAD and RUN, press and continue to hold the SHIFT key, then press the RUN/STOP key. This will LOAD your program into memory, then run it without your having to type and enter RUN.
Another method is to "string load" your cassette programs. String LOADing programs is LOADing and RUNning one program which in turn LOADs and RUNs the next program on the cassette tape. To accomplish this, LOAD and RUN your first program normally, and use the last statement of this program to call in the second program with a LOAD command. For instance, the last line of the program would read: 60000 LOAD "filename". When the program encounters this statement, it will automatically LOAD and RUN the next program on the cassette tape. This can also be a very useful programming technique for saving memory if, for example, you have a program that has a long list of instructions for the user to read before running the program. You can use the first program in the "string" to display the instructions and then load in the second program when the user is finished reading.