Personal Computer News


Memotech Verify Routine Is No Bug

 
Published in Personal Computer News #053

Memotech Verify Routine Is No Bug

The bug in the Memotech Verify routine (issue 50) is not actually a bug at all. The Memotech will save program variables, if any exist, along with the program. Thus, if the program has been run before it is saved, and no lines have been edited between running and saving, the current values of the program variables are saved.

After saving, the Memotech does a CLEAR and the program variables are 'forgotten'. Obviously, when a verify is attempted, both the length and content of the saved program are different from that in memory and a MISMATCH error occurs. To avoid this, providing you don't want to save the program variables, use the direct command CLEAR, immediately before saving the program.

This facility for saving the program variables can be very useful when SAVE is used from within a program, since when the MTX encounters an embedded SAVE command it saves the program along with its current values onto tape. A program, saved in this way will, on loading, run starting from the instruction directly after the SAVE command.

The simplest use for this is in making programs that auto-run on loading, e.g.

10 SAVE "PROGRAMME"
20 PRINT "THIS PROGRAM WILL AUTO RUN"
30 STOP

Type in this program, start the tape for record, then type RUN (ENTER). When the program has saved itself onto tape, load it back in and see what happens.

Dave Mansell, Callingwood, Cornwall

Peter Worlock