English
Language : 

M30222 Datasheet, PDF (44/237 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
deUvnedloepr ment
Specifications in this manual are tentative and subject to change
MITSUBISHI MICROCOMPUTERS
M30222 Group
Rev. G
Overview of Interrupts
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.26 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
MSB
Stack area
LSB
Address
MSB
Stack area
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
m – 4 Program counter (PC L)
m–3
Program counter (PCM)
m–2
Flag register (FLG L)
m–1
Flag register
(FLGH)
Program
counter (PCH)
m
Content of previous stack
m + 1 Content of previous stack
[SP]
New stack
pointer
Stack status before interrupt request
is acknowledged
Stack status after interrupt request
is acknowledged
Figure 1.26. State of stack before and after acceptance of interrupt request
1-45