Have you ever thought you’d like a backup copy of a valued program but couldn’t break into it to save it? Or have you ever admired a feature of a program and wanted to look at it to see how it’s done? Then this short (12 byte) program is for you.
The 8K Sinclair ROM provides features that many more expensive computers lack. Unfortunately, to accomplish this, many M/C routines are intertwined and using them for our own purposes are difficult if not impossible. Many sources will provide the starting addresses of the LOAD (832 dec.) and BREAK (930 dec.) routines. But how can we combine these to load a program and then stop it so we can list or save it?
For you M/C lovers, the first three bytes of the LOAD routine in turn calls another routine whose purpose it is to identify the name of the program to be loaded. If there is no name, as in the case of LOAD”” then the Carry Flag is set and then the seventh bit of the D Register is set to 1. If the Carry Flag can be set and the D Register loaded, this routine can be bypassed and the LOAD routine accessed by a USR call. The first program it comes to on a tape will be loaded. If we follow the load routine call by a break routine call we will have accomplished our purpose of loading and stopping our “unbreakable” tape.
STOPPER
MNEMONIC COMMENT
LD A, 1 Force Carry
SRA A Flag to 1
LD D, 0 Set D Register
Call 835 (dec.) Access LOAD Routine
3 bytes in
Call 930 (dec.) Access BREAK Routine
So much for the technical aspects, let’s get down to the implementation. For the STOPPER to work, the T/S 1000 must be in FAST mode and the program must be outside of RAM so it will not be overwritten by the program we are loading. To do this we will reserve a minimal area above RAMTOP.
STEP 1: FAST
STEP 2: POKE 16388,242
POKE 16389,127
NEW Then FAST
STEP 3: Enter the following program:
10 LET S=0
20 FOR I=1 TO 12
30 INPUT A
40 POKE (32754+I),A
50 LET S=S+A
60 NEXT I
70 PRINT AT 0,0;"SUM=";S
STEP 4: Run the program and ENTER this list of numbers:
62;01,203,47,22,00,205,67,03,205,162,03
STEP 5: Your sum should be 980. If not, run STEP 3 and enter the numbers in STEP 4 again.
STEP 6: Now use STOPPER by entering RAND USR 32755 and turning on your tape recorder. If the load has been successful you will view a blank screen with the message D/0. If not, use the “usual” recorder adjustments to correct a normal unsuccessful LOAD and try again from STEP 6.
If you have any comments or problems, I’m always glad to hear from you.
Walt Coleman
[address omitted] TSH
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.