41
CHAPTER 3 CPU
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 "Stack operation at start of interrupt processing" shows the stack operation at the start of
interrupt processing.
Figure 3.4-5 Stack operation at start of interrupt processing
■
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.
Note:
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.
027C
H
027D
H
027E
H
027F
H
0280
H
0281
H
Address Memory
0870
H
PS
E000
H
PC
0280
H
SP
Immediately before
interrupt
08
H
70
H
E0
H
00
H
XXH
XXH
027C
H
027D
H
027E
H
027F
H
0280
H
0281
H
Address Memory
027C
H
SP
0870
H
PS
E000
H
PC
Immediately after
interrupt
PS
PC
XXH
XXH
XXH
XXH
XXH
XXH
Summary of Contents for MB89950 Series
Page 2: ......
Page 3: ...FUJITSU LIMITED F2MC 8L 8 BIT MICROCONTROLLER MB89950 950A Series HARDWARE MANUAL ...
Page 4: ......
Page 10: ...vi ...
Page 34: ...20 CHAPTER 2 HANDLING DEVICES ...
Page 134: ...120 CHAPTER 6 WATCHDOG TIMER ...
Page 236: ...222 CHAPTER 10 UART ...
Page 276: ...262 CHAPTER 12 LCD CONTROLLER DRIVER ...
Page 310: ...296 APPENDIX ...
Page 311: ...297 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Page 316: ...302 INDEX ...
Page 318: ......