English
Language : 

M16C30_02 Datasheet, PDF (56/178 Pages) Renesas Technology Corp – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Interrupt
Mitsubishi microcomputers
M16C / 30 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Saving Registers
In the interrupt sequence, only the contents of the flag register (FLG) and that of the program counter
(PC) are saved in the stack area.
First, the processor saves the four higher-order bits of the program counter, and 4 upper-order bits and 8
lower-order bits of the FLG register, 16 bits in total, in the stack area, then saves 16 lower-order bits of the
program counter. Figure 1.11.6 shows the state of the stack as it was before the acceptance of the
interrupt request, and the state the stack after the acceptance of the interrupt request.
Save other necessary registers at the beginning of the interrupt routine using software. Using the
PUSHM instruction alone can save all the registers except the stack pointer (SP).
Address
Stack area
MSB
LSB
m–4
m–3
m–2
m–1
m
Content of previous stack
m + 1 Content of previous stack
[SP]
Stack pointer
value before
interrupt occurs
Address
Stack area
MSB
LSB
m – 4 Program counter (PCL)
m – 3 Program counter (PCM)
m–2
Flag register (FLGL)
m–1
Flag register
(FLGH)
Program
counter (PCH)
m
Content of previous stack
m + 1 Content of previous stack
[SP]
New stack
pointer value
Stack status before interrupt request
is acknowledged
Stack status after interrupt request
is acknowledged
Figure 1.11.6. State of stack before and after acceptance of interrupt request
55