UM012811-0904
Interrupts
eZ8 CPU
User Manual
31
1. Push the low byte of the Program Counter, PC[7:0], on the stack.
2. Push the high byte of the Program Counter, PC[15:8], on the stack.
3. Push the Flags Register on the stack.
4. Fetch the High Byte of the Interrupt Vector
5. Fetch the Low Byte of the Interrupt Vector
6. Branch to the Interrupt Service Routine specified by the Interrupt Vector
Figure 17 illustrates the effect of vectored interrupts on the Stack Pointer and the contents
of the stack. Figure 18 provides an example of the Program Memory during interrupt oper-
ation. In the example of Figure 18, the Interrupt Vector is located at address
0014H
in Pro-
gram Memory. The 2-byte Interrupt Vector, stored at Program Memory addresses
0014H
and
0015H
, is loaded into the Program Counter. Execution of the Interrupt Service Rou-
tine begins at Program Memory address
4567H
, as is stored in the Interrupt Vector.
Figure 17. Effects of an Interrupt on the Stack
Top of Stack
Stack Pointer
Flags[7:0]
PC[15:8]
PC[7:0]
Stack Pointer
Stack Pointer and Stack
Before an Interrupt
Stack Pointer and Stack
After an Interrupt