Load interrupt

From Ninerpedia
(Redirected from Load interrupt switch)
Jump to navigation Jump to search

Hardware Modification - Load Interrupt Switch.

There is a piece of software many of you have which can use a Load Interrupt Switch.

At any time you can by means of a hardware switch tell the computer to stop what it is doing and go to a specific memory location and run the program it finds there.

This has been used for example for dumping screen displays to printer, although it is also done (better) using a software interrupt, whereby the computer runs the main program and keeps taking time off to say scan the keyboard for a command key- effectively doing two things at once.

TI have provided us with a program which can use a load interrupt switch, although they did not tell us about it. It is the DEBUG program that comes with editor assembler, and this is how you utilise it...

Insert the Editor Assembler module, and have the disk with DEBUG on it in drive one. Choose TI Basic and type in and run this program:

110 CALL LOAD(8228,96,0)
130 CALL LOAD(-4,131,224,112,190) 
140 CALL LOAD(8228,160,0)
170 END
This loads DEBUG. 

Enter BYE and select an option of Editor Aseembler- eg LOAD AND RUN. While the LOAD AND RUN (D/F 80) program you have selected is running- say a game! - press your load interrupt switch and you will be in DEBUG and can have a look around!

For the technically minded, pressing the switch causes the computer to do a BLWP to >FFFC where >FFFC contains the WS pointer and >FFFE contains the Program Counter. Line 130 above puts the addresses into these locations.

Now, if you have DEBUG in memory, then load a program, where is debug going to be? The listing above places DEBUG out of the way into ram area >6000 - which you need to provide! Either by modifying an editor assembler module by adding 8k ram or by use of a SUPER SPACE module or similar. Or omit lines 110 and 140, use only relocatable code, and hope there are no clashes... Line 110 resets FFAH (First Free Address in High Memory) to >6000 while line 140 chanqes it back to >A000

circuit diagram of a load interrupt switch

OK... that switch. You need to connect a simple switch between two tracks on the right hand port - using a speech synth is best as you don't then need to take the console apart.

First, just a simple switch, which due to what is called switch bounce, may send multiple signals to the CPU causing a crash (a good switch will work OK around 60% of the time!) then a slightly improved circuit.

Looking at the edge of the card, at the upper right of the console, pin 13 (LOAD) is the seventh pin from the left, on the bottom. This is one end of your switch. Inside the speech synth you will find that on the SAME side there are four tracks connected- 11,12, 13 and 14 from the left - this is the other end of your switch. For improved operation connect a 0.1mF bypass capacitor across the switch and a 2.2k resistor in series with it.