Prevent your BASIC programs from being listed or stopped with
this simple routine
How often have you written a BASIC program that you
want to protect from accidental BREAKs or SYSTEM RESETs? Perhaps you
want to prevent others from seeing the listing or simply want to
make your program look more professional? Worry no more, for NON
STOP BASIC will do just this for you.
The program is quite simple. It stores a machine code routine at
location $100 (thus leaving Page 6 free for other programs) and
simply disables the Break key and uses IOCB # to print' RUN' on the
screen,' RETURN' it, and pass control back to BASIC. The SYSTEM
RESET key is vectored to the program through CASINI so your own
BASIC program will be run from the RESET key.
POSSIBLE PROBLEMS
There are a few problems you may run into with
NON STOP. Firstly any BASIC errors will stop the program so all
errors must be properly trapped. Secondly, any statement which opens
the Editor (e.g. Graphics calls) normally re-enables the Break key.
NON STOP handles this by using a stage 1 VBI to constantly disable
the Break key but if you use your own VBI you may have problems. If
you do use a Stage 1 VBI, change line 32050 to a REM and ensure that
your VBI routine disables the Break key. This can be done by adding
the following instructions to your routine.
LDA $10
AND #7F
ORA #40
STA $D2OE
STA $10
Finally some programs 'ERROR' or crash when run a
second time. If you can't identify and alleviate this problem, then
I am afraid that you won't be able to use NON STOP properly.
USING NON STOP
Simplicity itself! Just type in the listing and LIST it to disk or
cassette. Load, or write, your program and ENTER the NON STOP
listing. Change the first line of your program to GOSUB 32000 and
you are away!
Now when you write a program to keep the kids quiet, they will have
to play it and not mess around with your code!
|
|
|
top