Multisave

See all articles from SYNC v3 n1
Author(s): Doug Watson
Publication: SYNC
Pub Details: SYNC v3 n1 (Volume 3, Issue 1)
Date: January/February 1983
Pages: 39

Reliability of cassette storage and retrieval of programs and data requires multiple saves. Having to attend to the computer’s needs as each save is completed is, however, a bit of a chore.

Wouldn’t it be nice

1) to key in the number of saves required and leave the ZX81 to complete that number of identical copies?

2) not have to check what variables have been assigned before incorporating this feature in a program?

3) to retain the normal, single-save mode?

If this appeals to you, try the demo program shown. The address shown as 16004 can be any unused, non-saved address in RAM (such as from 8192 to 16383 with the 64K Memopak or above RAMTOP) that is normally 0. PEEK it to find out.

  5 REM "PROGRAM NAME"
10 PRINT AT 5,6;"* * * PROGRAM * * *"
20 PRINT ,,,," FOR MULTIPLE SAVES, GOTO 100"
30 PRINT ,,,," FOR SINGLE SAVE, GOTO 150"
40 STOP
100 PRINT "HOW MANY SAVES?"
110 PAUSE 40000
120 POKE 16507,VAL INKEY$-1
130 CLS
150 SAVE "PROGRAM NAME"
160 REM SLOW OR FAST HERE IF DESIRED
170 IF PEEK 16507=0 THEN RUN
180 POKE 16507,PEEK 16507-1
190 GOTO 150
       * * * PROGRAM * * *

  FOR MULTIPLE SAVES, GOTO 100

  FOR SINGLE SAVE, GOTO 150

On GOTO 100, HOW MANY SAVES? appears on the screen and waits (no L cursor). When one of the keys, 1 to 9, is pressed, the selected number of saves will be executed. If 0 is pressed, 256 saves will follow. Use BREAK to terminate.

On GOTO 150, a single save is executed.

No variables are used so compatibility with any program is automatic.

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.