SaturnRingLibrary 0.9.2
SGL wrapper
Loading...
Searching...
No Matches

◆ SetInterruptHandler()

void SRL::System::SetInterruptHandler ( InterruptType type,
void * handler )
inlinestatic

Register a function as an SCU interrupt handler.

Parameters
typeSCU interrupt source to handle (0x40-0x4F)
handlerFunction pointer to register (or nullptr to clear)

Calls the BIOS entry at 0x6000300. The handler is invoked by the interrupt dispatcher when the corresponding SCU interrupt fires.

Warning
SCU handlers only. The handler function must be declared with __attribute__((interrupt_handler)) so the compiler emits rte instead of rts. This requirement does not apply to CPU/TRAP vectors (0x60-0x8F) which use normal rts. Omitting the attribute on an SCU handler will crash on return from interrupt.
See also
Interrupt::SetHandler() for the type-safe wrapper with compile-time checks