Stack Operation During Interrupt Processing; Figure 3.4-5 Stack Operation At Start Of Interrupt Processing - Fujitsu F2MC-8L Series Hardware Manual

8-bit microcontroller
Hide thumbs Also See for F2MC-8L Series:
Table of Contents

Advertisement

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.
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.
Immediately before
interrupt
0870
PS
E000
PC
SP
Stack Operation at Restore Operation from Interrupt
On execution of the "restore operation from interrupt" 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 to the stack. Use the PUSHW and POPW instructions to save and restore A and T
contents to and from the stack.

Figure 3.4-5 Stack Operation at Start of Interrupt Processing

Address Memory
xx
027C
H
H
H
xx
027D
H
H
xx
027E
H
H
H
xx
027F
H
H
xx
0280
0280
H
H
H
xx
0281
H
H
Immediately after
interrupt
Address Memory
027C
027C
H
SP
027D
0870
H
027E
PS
027F
E000
H
0280
PC
0281
3.4 Interrupts
08
H
H
PS
70
H
H
E0
H
H
PC
00
H
H
xx
H
H
xx
H
H
51

Advertisement

Table of Contents
loading

Table of Contents