Personal Computer News


Spectrum Halfway Measure

 
Published in Personal Computer News #095

Spectrum Halfway Measure

If you want to save a program still under development and clear the computer's memory to test a subroutine or program lines before incorporating them, you may find this procedure useful:

1 LET a=PEEK 23637+256*PEEK 23638:PRINT PEEK a:PRINT PEEK (a+1):STOP

Enter RUN 1 and note down the two Peeked numbers given. Now change the line to

1 LET a=PEEK 23637+256*PEEK 23638:POKE a,64:POKE (a+1),0:STOP

and enter RUN 1. All the program lines after number 1 should vanish. Now any subroutines or other lines can be entered to be tested and even RUN, to get them right.

To return to the original program, it is essential to delete any temporary lines by using the edit key in the usual way, after which, enter RUN 1 (to reset Var a) and enter as a direct command:

"POKE a, (the first number noted):POKE (a+1),(the second number)",

and it will re-appear.

R. Luxton
Solihull, West Midlands

R. Luxton