Datasheet

Table Of Contents
9. Interrupt
page 72
923fo7002,51.beF00.2.veR
0020-2020B90JER
)T62/C61M,B62/C61M,A62/C61M(puorGA62/C61M
9.4.3 Saving Registers
In the interrupt sequence, the FLG register and PC are saved to the stack.
At this time, the 4 high-order bits of the PC and the 4 high-order (IPL) and 8 low-order bits in the FLG
register, 16 bits in total, are saved to the stack first. Next, the 16 low-order bits of the PC are saved. Figure
9.4.3.1 shows the stack status before and after an interrupt request is accepted.
The other necessary registers must be saved in a program at the beginning of the interrupt routine. Use
the PUSHM instruction, and all registers except SP can be saved with a single instruction.
Address
Content of previous stack
Stack
[SP]
SP value before
interrupt request is
accepted.
m
m 1
m 2
m 3
m 4
Stack status before interrupt request
is acknowledged
Stack status after interrupt request
is acknowledged
Content of previous stack
m + 1
MSB LSB
m
m 1
m 2
m 3
m 4
Address
FLG
L
Content of previous stack
Stack
FLG
H
PC
H
[SP]
New SP value
Content of previous stack
m + 1
MSB LSB
PC
L
PC
M
Figure 9.4.3.1. Stack Status Before and After Acceptance of Interrupt Request