User Interrupt

z80 » Advanced

Interrupts are when regular code execution is suspended while a separate section of code is executed.

The Run Indicator at the top right of the screen is an example: it is 'animated' by the interrupts until the calculations are finished. The calculations don't have to worry about redrawing it. The interrupt routine will check to see if the calculations are still being performed and, if so, continue animating the indicator.

Another example is the mouse pointer on your computer screen. The computer is redrawing the mouse on the screen all the time. When it's moved, the old position is erased and the new spot is rendered.

TI-OS allows you to execute your own interrupt routine 100+ times a second, while regular code is running. This all depends upon the battery power: faster with fresher batteries. All you have to do is copy your own routine to a designated area and set the appropriate flag.

Read more about interrupts in:


More from z80 » Advanced
All The Ports // APD // Assembler Directives // Entry Stack // User Fonts // IM 1 // IM 2 // Index, Shadow, and Other Registers // User Interrupt // Morphic Code // On-Off // Reading Keypresses from Port // Shift and Rotate // Simulating Key Presses // Sound // Square-Root Programs // System Flags of TI-OS