DATASAVE

Developer(s): Ron Charlton
Date: 1984
Type: Program
Platform(s): ZX81, TS 1000
Tags: Utility

A machine-code utility that saves and loads data, not programs. Set S to the start address and E to the end of the memory you want, then RAND USR 16514 saves it to tape and RAND USR 16543 loads it back, to the same place or anywhere else. It uses the ROM’s tape routines, needs no file name, and loads the first block it finds, so a program can save its data, load it back later and carry on. Set RAMTOP below the area you use.

The routine lives in a REM in line 1. The article has you type a REM of 155 A’s and a loader, POKE in the numbers of Listing 2 and then delete everything but line 1. The download is that line 1 plus the example from Listing 5, which saves the top 1024 bytes of a 16K machine. The article lists three error reports the routine can give, and notes that POKE 16667,0 and POKE 16668,0 restore the Syntactic Sum after use.

Published in Syntax August 1984 (Datasave – Files Without Programs).

Related Articles

DATASAVE allows you to save a selected portion of memory to tape and then load it back again to any part of memory. Loading code with DATASAVE does not (of necessity) write over the program that you are running, so a program can load data from tape, manipulate it, and then save it back to tape.

Image Gallery

Source Code

   1 REM AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
   5 REM SAVE TOP 1024 BYTES
  10 LET S=31744
  20 LET E=32767
  30 RAND USR 16514

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