With a 64K RAM pack, this routine copies the whole 16K working memory (16384-32767) into high memory as a snapshot, and copies it back when you need it. It is meant for crash recovery while you work on machine code, and for keeping two programs ready to swap in. RAND USR 8192 saves snapshot 1 (at 32768) and RAND USR 8197 saves snapshot 2 (at 49152). RAND USR 8214 and RAND USR 8219 load them back. The calls work inside programs too; loading a snapshot taken by a program line carries on from that line.
The 44-byte routine lives at 8192, so you need RAM in the 8K-16K area as well as above 32K, as most 64K packs provide. With 32K and RAM at 8K-16K you can use snapshot 1 only. After a crash you need a reset button (the article describes one). The routine always switches to FAST. Don’t load a snapshot you never saved, since the system will crash.
LOAD this program and type GOTO 10 to put the routine in place. The article has you type in the listing, RUN it, enter the 44 numbers and delete lines 5 and 20 before saving. The download is that saved program, with the numbers already in the array D.
Published in Syntax May 1984 (ZX/TS RAM Pseudo Disk).
Source Code
10 FOR A=1 TO 44
30 POKE A+8191,D(A)
40 NEXT ANote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

