H8 Interrupts

H8 interrupts, by Allen Martin

I haven't seen this posted anywhere, so hopefully this information is useful to some people. The RCX ROM interrupt vectors (0x6..0x48) point to ISRs in ROM that then use another interrupt vector table in RAM (0xfd92..0xfdbe) to call the real ISRs. The RAM vector table is initialized to 0x46a which just contains a "rts" instruction (basically an unhandled interrupt). Later on some of the vectors are overwritten with "real" ISR addresses, all of which reside in ROM. It doesn't appear that the firmware touches this table, so my hunch is that any interrupts that don't have ISRs registered by the ROM are unused, unless there is some indirect way the firmware writes to this table.

I made a table of interrupts and handlers:
Name ROM Vector RAM Vector ROM Handler Description
NMI 0x0006 0xfd92 None Non Maskable Interrupt
IRQ0 0x0008 0xfd94 0x1ab8 Interrupt 0 (button?)
IRQ1 0x000a 0xfd96 0x294a Interrupt 1 (button?)
IRQ2 0x000c 0xfd98 None Interrupt 2
ICIA 0x0018 0xfd9a None 16 bit Timer - Input Capture A
ICIB 0x001a 0xfd9c None 16 bit Timer - Input Capture B
ICIC 0x001c 0xfd9e None 16 bit Timer - Input Capture C
ICID 0x001e 0xfda0 None 16 bit Timer - Input Capture D
OCIA 0x0020 0xfda2 0x36ba 16 bit Timer - Output Compare A
OCIB 0x0022 0xfda4 None 16 bit Timer - Output Compare B
FOVI 0x0024 0xfda6 None 16 bit Timer - Overflow
CMI0A 0x0026 0xfda8 None 8 bit Timer 0 - Compare Match A
CMI0B 0x0028 0xfdaa None 8 bit Timer 0 - Compare Match B
OVI0 0x002a 0xfdac None 8 bit Timer 0 - Overflow
CMI1A 0x002c 0xfdae None 8 bit Timer 1 - Compare Match A
CMI1B 0x002e 0xfdb0 None 8 bit Timer 1 - Compare Match B
OVI1 0x0030 0xfdb2 None 8 bit Timer 1 - Overflow
ERI 0x0036 0xfdb4 0x30a4 Serial Receive Error
RXI 0x0038 0xfdb6 0x2c10 Serial Receive End
TXI 0x003a 0xfdb8 0x2a9c Serial TDR Empty
TEI 0x003c 0xfdba 0x2a84 Serial TSR Empty
ADI 0x0046 0xfdbc 0x3b74 A/D Conversion End
WOVF 0x0048 0xfdbe None Watchdog Timer Overflow


Russell Nelson
Last modified: Mon Oct 19 14:05:13 EDT 1998