Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
interrupt_scheduler [2016/05/23 00:55] ex_writer [CTIMER] |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Interrupt Scheduler ====== | ||
- | |||
- | The Interrupt Scheduler handles system timers and counters. | ||
- | |||
- | ===== Interrupt Scheduler Routines ===== | ||
- | |||
- | ^ Name ^ Description ^ | ||
- | | ACTINT | Activate automatic interrupt service (timers, music, blackout) | | ||
- | | CTIMER | Call custom timer | | ||
- | | DECCTS | Decrement counters/timers under mask (used by ACTINT and DECCTS) | | ||
- | | STIMER | Track and decrement game timers | | ||
- | |||
- | ===== Interrupt Scheduler Routine Descriptions ===== | ||
- | |||
- | ==== ACTINT ==== | ||
- | |||
- | ACTIVE INTERRUPTS | ||
- | |||
- | | Calling Sequence: | <code z80>SYSTEM ACTINT</code> or <code z80>SYSSUK ACTINT</code>| | ||
- | | Arguments: | None | | ||
- | | Outputs: | None | | ||
- | | Function: | Sets IM=2, INLIN=200, sets I register + INFBK\\ Calls TIMEX and TIMEY\\ Enables interrupts | | ||
- | | Description: | Once ACTINT is called, it provides interrupt service completely automatically. It runs the seconds timer, the game timer, the music processor, and blackout timers, plus CT0, CT1, CT2, CT3. Timers function every 1/60th of a second. | | ||
- | |||
- | ==== CTIMER ==== | ||
- | |||
- | CUSTOM TIMER | ||
- | |||
- | | Calling Sequence: | <code z80>CALL CTIMER</code>| | ||
- | | Input: | HL = address of custom time base\\ B = value to load into time base 1 to 0 transition\\ C = counter mask as in [[interrupt scheduler#deccts|DECCTS]] | | ||
- | | Notes: | None | | ||
- | | Description: | HL is loaded and decremented. If HL != 0, then a return is executed, otherwise, HL is loaded with B and [[interrupt scheduler#deccts|DECCTS]] is called.\\ Registers HL, DE, BC, and AF are undefined upon exit. | | ||
- | | Restrictions: | None | | ||
- | ==== DECCTS ==== | ||
- | |||
- | ==== STIMER ==== | ||
- | |||
- | |||
- | |||