TRAP_PROC

The return instruction from the function is JMP IEA (jump to the Interrupt Exit Address register). At this address, a jump opcode is hard-wired, and the destination of the jump is stored by the core in the Interrupt Return Address register (IRA). When using #pragmaTRAP_PROC, the user can configure which registers should be saved when entering the interrupt handler and restored at exit.

The syntax for this pragma is:

  #pragma TRAP_PROC [SAVE_A|SAVE_X|SAVE_PAGE].
  
  
Note: The arguments can be provided in any combination, for example #pragma TRAP_PROC SAVE_A SAVE_PAGE, and have as effect saving the accumulator register, the index register, and the PAGESEL register respectively.