Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
system_routines:interrupt_scheduler [2016/06/05 16:34]
ex_writer [STIMER]
system_routines:interrupt_scheduler [2016/06/11 22:23] (current)
ex_writer [CTIMER]
Line 24: Line 24:
 Once ACTINT is called, it sets:  ​ Once ACTINT is called, it sets:  ​
   * Z80 Interrupt mode 2 (IM 2)  ​   * Z80 Interrupt mode 2 (IM 2)  ​
-  * INLIN = 200 (line 100)  ​+  * INLIN = C8H = 200 (i.e., line 100)  ​
   * I register and Interrupt Feedback (INFBK)  ​   * I register and Interrupt Feedback (INFBK)  ​
   * Enable interrupts (EI)   * Enable interrupts (EI)
  
 ACTINT also calls TIMEX and TIMEY which decrement counters/​timers. ​ ACTINT also calls TIMEX and TIMEY which decrement counters/​timers. ​
 +
 +<wrap alert>​Appears to call TIMEZ rather than TIMEX? CTIMER calls TIMEX.</​wrap>​
 ==== CTIMER ==== ==== CTIMER ====
  
Line 35: Line 37:
 | Calling Sequence: | <code z80>​CALL ​     CTIMER</​code>​| | 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]] | | 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]] |
-| 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. |+| Description:​ | Calls TIMEX, which decrements a time base in RAM (HL). 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. |
  
 ==== BMUSIC ==== ==== BMUSIC ====