SELF DELETE (16K ZX81)
by David Gribble, Tackley, Oxfordshire
from Your Computer (March 1984), Pages 182-183

Many useful utilities have been published for the Sinclair ZX-81 eg.,
dissassembler, memory left, hex loader etc.

I have found these to be most useful for development of machine-code
programs by including them all in a starter program which can be loaded
from tape before commencing the machine-code program. This however raises a
problem when the machine code is completed as I then have more than a
hundred BASIC lines to delete to leave the new program in a finished state
without surplus statements.

My solution to this problem is to add one more routine to the starter
program. The purpose of this routine is to delete all BASIC line numbers
within a range, input simply as a start and end number. The routine can
safely delete itself!

The program to delete the lines is a machine-code routine consisting of 94
bytes held in a REM statement.

Enter RUN 9980 and respond to the start and end number requests using 1 and
230 respectively. These lines will then no longer exist as illustrated by
the listing following the report code 0/9992. The program will detect any
obvious inconsistencies in the line numbers entered.

The program as described will be of most interest to 16K users who write
their programs in machine code. The program will, however, work on a 1K
machine.
