BREAK DISABLE
by Robert Newman
from Your Computer June 1984


I have written two machine-code routines for the Spectrum which
disable the BREAK key during the running of a BASIC program - ie.
preventing the errors "BREAK into program" and "BREAK - CONT repeats"
from halting the program.

Routine A also causes the computer to reset when the program finishes,
or if any error apart from BREAK occurs. This would be useful if you
want to prevent people from listing or copying your program. However,
unless your program is on a Microdrive, it could always be MERGEd
instead of LOADed to overcome this.

Routine B just disables BREAK, so that if the program stops for any
other reason it can be listed, edited, RUN, etc.

Put the lines of BASIC from Listing 1 at the beginning of your
program, using the DATA statements for either Routine A or Routine B.
Both routines can be used with 16k or 48k; you only need to change the
CLEAR statement in line 2 and the value of "start" in line 3.

If you only want to disable BREAK during certain parts of your
program, then miss out lines 5 and 6, and use the two POKEs later when
you want to switch on the Break-disable. BREAK can then be re-enabled
with these two POKEs: POKE errsp,3: POKE errsp+1,19

