Stack Operation At Interrupt Processing; Stack Operation At The End Of Interrupt Processing - Fujitsu F2MC-8L F202RA Hardware Manual

F2mc-8l 8-bit microcontroller
Hide thumbs Also See for F2MC-8L F202RA:
Table of Contents

Advertisement

3.4.5

Stack Operation at Interrupt Processing

This section describes how values in registers are saved and restored at interrupt
processing.
Stack Operation at the Beginning of Interrupt Processing
After accepting an interrupt, the CPU automatically saves the values in the program counter (PC) and
program status (PS) in the stack.
Figure 3.4-5 shows the stack operation at the beginning of interrupt processing.
Figure 3.4-5 Stack Operation at the Beginning of Interrupt Processing
Immediately before
interruption
PS
0870
H
PC
E000
H
SP
0280

Stack Operation at the End of Interrupt Processing

When the return instruction (RETI) is executed at the end of interrupt processing, the values in the program
status (PS) and the program counter (PC) are restored from the stack in that order (which is opposite to that
at the beginning of interrupt processing). This operation restores the values in the PS and PC to those
values used before interruption.
Note:
Values in the accumulator (A) and temporary accumulator (T) are not automatically saved in the stack.
Therefore, save and restore the values using the PUSHW and POPW instructions.
Address
Memory
027C
XX
H
H
027D
XX
H
H
027E
XX
H
H
027F
XX
H
H
0280
XX
H
H
H
0281
XX
H
H
Immediately after
interruption
Address
SP
027C
027C
H
027D
027E
PS
0870
H
027F
0280
PC
E000
H
0281
CHAPTER 3 CPU
Memory
08
H
H
PS
70
H
H
E0
H
H
PC
00
H
H
XX
H
H
XX
H
H
41

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-8l mb89202Mb89202/f202ra series

Table of Contents