84
SP(R7)
SP – 4
SP – 3
SP – 2
SP – 1
SP (R7)
SP + 1
SP + 2
SP + 3
SP + 4
Even address
CCR
CCR
*
PC
H
Before interrupt
is accepted
After interrupt
is accepted
Pushed onto stack
Upper byte of progam counter
Lower byte of progam counter
Condition code register
Stack pointer
PC
H
:
PC
L
:
CCR:
SP:
The PC contains the address of the first instruction executed after return.
Registers must be saved and restored by word access at an even address.
Notes: 1.
2.
*
Ignored on return.
Stack area
PC
L
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.