Run BASIC program on ERROR and Reset

Hardware Hacking, Programming and Game Solutions/Cheats
Post Reply
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Run BASIC program on ERROR and Reset

Post by zephyr »

Here is a routine which restarts a BASIC program when an error is encountered, or the reset button pressed. The machine code routine is position independent.

Code: Select all

10 'ERROR-RUN V1.0
20 'FOR THE DRAGON 32/64
30 'BY STEPHEN J WOOLHAM
40 '***************************
50 'BASIC EXAMPLE PROGRAM
60 '***************************
70 CLEAR200,32723
80 MC$="CC557E308D000B97719F72F7018EBF018F39120F6F0FE30FE4B6FF038A01B7FF03BD841F1CAFBD83ED7E849F"
90 X=1:FOR I=32724 TO 32767:POKE I,VAL("&H"+MID$(MC$,X,2)):X=X+2:NEXT
100 EXEC32724
Post Reply