3.8.7 STM8 Interrupt Service Routines

The STM8 interrupt table contains 31 entries: Reset (used by SDCC for program startup), trap and user interrupts 0 to 29. Where the keyword __interrupt is used for normal user interrupts, the __trap keyword is used for the trap handler:

void handler (void) __trap 
{ 
    ... 
}