Saving The Screen
Can you provide me with a program that will save the screen to disk on the Commodore 64?
Ron Jentz
When saving a screen to disk, you'll want to save both text and color memory. The following BASIC loader POKEs a machine language program into memory at location 828. After running the program, the screen will be saved anytime you press the Commodore logo key and f1 simultaneously.
QS 170 DATA 232, 160, 219, 32, 216, 255, 169, 0, 141, 219 EF 180 DATA 3, 173, 220, 3, 133, 15, 7, 76, 49, 234, 0, 0
Before you attempt to save a screen, you must choose filenames for the text and color memory files. The following two-line program will store the filenames in memory for you. Decide on the filenames and substitute them for the default names given in line 10.
10 T$="TEXT":S=679:GOSUB 20: T$="COLOR": S=696: GOSUB 20:END 20 L=LEN (T$): POKE, L : FORI=1TOL:POKES+I, ASC(MID$(T$, I, 1)):N EXT:RETURN
When you have a screen that you want to save, press Commodore-fl. If you wish to save another screen, use the program above to change the filenames. Otherwise, you'll get a disk error when the program attempts to overwrite your previously saved screen.
To load the saved screens, use the following program. Change lines 20 and 30 to specify the filenames you used when saving the screen.
IF A = 0 THEN A = 1: POKE 53265, PEEK (53265) AND 239:REM BLANK SCREEN 20 IF A = 1 THEN A = 2: LOAD"TEXT", 8, 1 30 IF A = 2 THEN A = 3: LOAD"COLOR", 8, 1 40 POKE 53265, PEEK (53265) OR16:REM TURN ON SCREEN 50 GOTO 50 60 REM CONTINUE BASIC PROGRAM
This last program could be to load a title screen for your own programs. Just change line 50 to a delay loop and continue your program from there.