Current Interrupt ID. If bit 0 is 0, then an interrupt is pending, and bits 2 and 1 indicate the cause. The interrupts are prioritized by value. Multiple interrupts can be pending. An interrupt handler should read this register repeatedly, handling each interrupt until this register shows that no interrupt is pending. Also, if a Data Available interrupt is followed by an Error Occurred interrupt before either is serviced, only the later will be reported. This is different than HP BASIC. If you enable both interrupts, and an Error interrupt occurs, you should manually check for data available using bit 0 of register 10.
Bit
Value
Meaning
7-3
-
Not used
2,1
6
Error Occurred (register 10, bits 1 to 4)(11)
4
Data Available (10)
2
Transmit Holding Register is empty (01)
0
Modem Status (register 11) changed (00)
0
1=No interrupt, 0=Interrupt pending
To handle, or acknowledge an interrupt, you should do the following: