Stack Operation Of Interrupt Processing - Fujitsu MB90480 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 3 INTERRUPT
3.9

Stack Operation of Interrupt Processing

If an interrupt is accepted, contents of the dedicated registers are automatically saved
in the system stack before branching to interrupt processing. Return from the stack is
also automatically performed when interrupt processing is completed.
Stack operation when interrupt processing starts
With an accepted interrupt, CPU automatically saves the contents of the current dedicated
registers in the system stack in the following sequence:
1. Accumulator (A)
2. Direct page register (DPR)
3. Additional data bank register (ADB)
4. Data bank register (DTB)
5. Program counter bank register (PCB)
6. Program counter (PC)
7. Processor status (PS)
Figure 3.9-1 shows the stack operation when interrupt processing starts.
Immediately
before interrupt
SSB
SSP
A
DPR
DTB
PC
PS
Stack operation during return from interrupt processing
At the end of interrupt processing, if the interrupt return instruction (RSTI) is executed, PS, PC,
PCB, DTB, ADB, DPR, and A values are returned from the stack in the reverse order of the start
of the interrupt processing. The dedicated registers are then restored to their previous state (i.e.,
immediately before the interrupt started).
90
Figure 3.9-1 Stack operation at start of interrupt processing
Memory
Address
08FF
H
00
H
08FE
H
XX
08FE
H
XX
XX
0000
08FE
H
H
XX
AH
AL
XX
ADB 00
01
H
H
XX
XX
PCB FF
00
H
H
XX
XX
803F
H
XX
XX
20E0
H
08F2
XX
H
Byte
Immediately
after interrupt
SSB
00
H
SP
H
SSP
08F2
H
H
A
0000
H
H
AH
H
01
DPR
H
H
H
DTB
00
H
H
H
PC
803F
H
L
H
PS
20E0
H
Memory
Address
08FF
H
08FE
H
00
H
H
00
H
08
08FE
H
H
H
FE
AL
H
01
DPR
H
ADB
00
H
00
ADP
H
00
DTB
H
FF
PCB
H
PCB
FF
H
80
H
H
3F
H
20
H
H
08F2
E0
H
H
Byte
SP
AH
AL
PC
PS
SP after
updating

Advertisement

Table of Contents
loading

Table of Contents