Figure 3.4.5 Stack Operation At Start Of Interrupt Processing - Fujitsu F2MC-8L MB89620 Series Hardware Manual

8-bit microcontroller
Table of Contents

Advertisement

3.4 Interrupts
3.4.5 Stack Operation during Interrupt Processing
This section describes the saving of the register contents to the stack and restore
operation during interrupt processing.
n Stack Operation at Start of Interrupt Processing
The CPU automatically saves the current contents of the program counter (PC) and program
status (PS) to the stack when an interrupt is accepted.
Figure 3.4.5 shows the stack operation at the start of interrupt processing.
PS
PC
n Stack Operation at Interrupt Return
On execution of the interrupt return instruction (RETI) at the completion of interrupt processing,
the CPU performs the opposite processing to interrupt initiation, restoring first the program
status (PS) and then the program counter (PC) from the stack. This returns the PS and PC to
their states immediately prior to the start of the interrupt.
Check: The CPU does not automatically save the accumulator (A) or temporary accumulator (T) contents
50
CHAPTER 3 CPU
Immediately before
interrupt
Address Memory
027C
H
0870
H
027D
H
027E
E000
H
H
027F
H
0280
0280
H
H
SP
0281
H

Figure 3.4.5 Stack Operation at Start of Interrupt Processing

to the stack. Use the PUSHW and POPW instructions to save and restore A and T contents to and
from the stack.
××
H
××
H
××
H
PS
××
H
××
PC
H
××
H
Immediately after
interrupt
Address Memory
027C
027C
H
H
SP
027D
H
0870
027E
H
H
027F
H
××
E000
H
0280
H
××
0281
H
08
H
PS
70
H
E0
H
PC
00
H
H
H
MB89620 series

Advertisement

Table of Contents
loading

Table of Contents