86:Ports:03

From WikiTI
Revision as of 05:03, 20 September 2021 by Zeroko (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

Port Number: 03h

Function: Interrupt Control Port

This port controls all devices that can generate interrupts.

Read Values

  • Bit 0: Set if the ON key generated an interrupt.
  • Bit 1: Set if the LCD controller generated an interrupt (after DMA for rows 17 & 49). Used by the OS as a periodic interrupt source (approximately 200 Hz).
  • Bit 2: Set if the /INT pin generated an interrupt (unused on the TI-86).
  • Bit 3: Reset if the ON key is being pressed; set otherwise.
  • Bit 4-7: Unused.

Write Values

  • Bit 0: Set 0 to disable ON key interrupts and to acknowledge an ON key interrupt. Set 1 to enable ON key interrupts.
  • Bit 1: Set 0 to disable LCD controller interrupts & to acknowledge an interrupt from the LCD controller. Set 1 to enable interrupts from the LCD controller.
  • Bit 2: Set 0 to disable external interrupts & to acknowledge an external interrupt. Set 1 to enable external interrupts.
  • Bit 3: Set 0 to turn off the LCD. Set 1 to turn on the LCD. When the LCD is off, DMA & LCD interrupts do not occur.
  • Bit 4-7: Unused.

Comments

  • You need to acknowledge interrupts. Otherwise a new interrupt will be generated directly after you enable interrupts again with EI. Because that disables that particular interrupt at the same time, you may have to write a second value to this port to re-enable it.
  • The OS shuts down by turning off the LCD & HALTing with the ON key interrupt enabled.