SP – 4
SP – 3
SP – 2
SP(R7)
SP + 1
SP + 2
CCR
*
CCR
PC (upper byte)
PC (lower byte)
SP – 1
SP + 3
SP + 4
SP (R7)
Even address
Stack area
Before interrupt
is accepted
After interrupt
is accepted
Pushed onto stack
PC: Program counter
CCR: Condition code register
SP: Stack pointer
Notes: 1. The PC contains the address of the first instruction executed after return.
2. Registers must be saved and restored by word access at an even address.
* Ignored on return.
Figure 4.6 Usage of Stack in Interrupt Handling
The CCR is comprised of one byte, but when it is saved to the stack, it is treated as one word of
data. During interrupt processing, two identical bytes of CCR data are saved to the stack to create
one word of data. When the RTE instruction is executed to restore the value from the stack, the
byte located at the even address is loaded into CCR, and the byte located at the odd address is
ignored.
78