![](http://datasheet.mmic.net.cn/30000/M30800MC-XXXFP_datasheet_2359329/M30800MC-XXXFP_68.png)
Under
development
Preliminary Specifications REV.D
Specifications in this manual are tentative and subject to change.
Mitsubishi Microcomputers
M16C/80 group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Interrupts
68
Saving Registers
In an interrupt sequence, only the contents of the flag register (FLG) and program counter (PC) are
saved to the stack area.
The order in which these contents are saved is as follows: First, the FLG register is saved to the stack
area. Next, the 16 high-order bits and 16 low-order bits of the program counter expanded to 32-bit are
saved. Figure 1.9.6 shows the stack status before an interrupt request is acknowledged and the stack
status after an interrupt request is acknowledged.
In a high-speed interrupt sequence, the contents of the flag register (FLG) is saved to the flag save
register (SVF) and program counter (PC) is saved to PC save register (SVP).
If there are any other registers you want to be saved, save them in software at the beginning of the
interrupt routine. The PUSHM instruction allows you to save all registers except the stack pointer (SP)
by a single instruction.
The execution speed is improved when register bank 1 is used with high speed interrupt register selected
by not saving registers to the stack but to the switching register bank. In this case, switch register bank
mode for high-speed interrupt routine.
Figure 1.9.6 Stack status before and after an interrupt request is acknowledged
Value that is set to IPL
7
0
Not changed
Changes of IPL When Interrupt Request Acknowledged
When an interrupt request is acknowledged, the interrupt priority level of the acknowledged interrupt is
set to the processor interrupt priority level (IPL).
If an interrupt request is acknowledged that does not have an interrupt priority level, the value shown in
Table 1.9.7 is set to the IPL.
Table 1.9.7 Relationship between Interrupts without Interrupt Priority Levels and IPL
Interrupt sources without interrupt priority levels
_______
Watchdog timer, NMI
Reset
Other
[SP]
Stack pointer
value before
interrupt occurs
Stack status before interrupt request is acknowledged
Address
Stack status after interrupt request is acknowledged
m-6
m-5
m–4
m–3
m–2
m–1
m
m+1
LSB
MSB
LSB
MSB
Address
Stack area
Flag register
(FLGL)
Program counter
(PCH)
Flag register
(FLGH)
Content of
previous stack
Content of
previous stack
Content of
previous stack
Content of
previous stack
Program counter
(PCL)
Program counter
(PCM)
[SP]
New stack
pointer value
m-6
m-5
m–4
m–3
m–2
m–1
m
m+1
0