---------- INCLUDE INTERRUPT DEMO by PER FINANDER ---------------- Well it is possible to use the interrupt in the TI85 and here's a small demo. The program must be started from Z-SHELL. Then you'll have two options: Press "More" to activate the program or "Exit" to deactivate it. "Itest" will continue the execution even when you exit ZShell and you must execute itest again to deactivate it. The only thing this program does is to scroll the top row of the text-screen every 32:th interrupt (a text: "interrupt demo"). Note: DO NOT ENTER GRAPH-MODE. If you do this your TI85 will surely hang. Take a backup of your TI85 before you test this program because I don't know how safe it is. (I don't know how many times I had to reset my TI85 during the development) How is this done: Well, I've discovered a way to take control over the interrupt in the TI85. The Z80 CPU uses one of three ways to respond to an Int signal: Mode 0: The unit who caused the interrupt places an instruction on the data bus when the Z80 acknowledes the interrupt (usually an rst xx instruction) to tell where the interrupt routine is. Mode 1: Used by the TI85, always jump to $0038 when an interrupt occurs. The int-routine is in ROM and cannot be altered. Mode 2: The unit who caused the interrupt places a interrupt vector number on the databus (0-127) and the I-register points to a vector table with jumppositions somewhere in the memory. I register : 8 bits (A8-A15) Vector number : 7 bits (A1-A7) A0 is always 0 ITest fills $8700-$87FF with $88. Then the I register is set to $87. When an interrupt occurs, the Z80 reads a value on the databus and then reads the value at $8700 + Value*2. All values in the interrupttable points to $8888 and there's my new intterrupt routine. The routine scrolls the top row one pixel to the left and then jumps to the original interrupt routine at $0038. The interrupttable & routine must remain fixed in the memory and therefore I use the graph-screen. I've tested itest with ZSHELL 3.0 & ROM 4.0. To select the interrupt mode, use IM function. (IM 0, IM 1 or IM 2) To Dan Eble: Since ZShell is "fixed" in the memory - why not implement a interrupttable and a small int-routine the user can hook own interrupt- routines to? Per Finander pfimdt93@tufvan.hv.se begin 644 itest.85s M*BI423@U*BH:#`!-86-H:6YE(&-O9&4@R2`@($EN=&5R0`` ` end