Expand description
Interrupt request lines: which trit of the interrupt masks each device owns.
An interrupt request, conventionally shortened to IRQ, is a device asking the processor for attention. Ternaria gives each device one trit, in two control registers the processor holds:
ip, interrupt pending. Written by the hardware. Tritkis positive while devicekis asking. A device keeps asking until something attends to it, so the trit stays positive; it is a level, not a pulse.ie, interrupt enable. Written by the operating system. Tritkis positive while the operating system is willing to be interrupted by devicek.
A source fires when both trits are positive, which is the per-trit minimum of the two masks: Kleene AND (D-06).
§Why the numbering lives here
A bus fills this mask in and a processor reads it, and the two are separate
crates that must agree on what each trit means. Neither can own the
numbering without the other duplicating it, so it belongs to the trait they
meet at, next to Addressable::interrupts.
Constants§
- CONSOLE
- The console has input waiting.
- COUNT
- How many sources are defined.
- TIMER
- The timer reached its compare value.
Functions§
- mask
- The value that enables one source when written to
ie.