Stack Operation During Interrupt Processing; Stack Operation At Start Of Interrupt Processing; Stack Operation At Interrupt Return - Fujitsu Semiconductor Controller MB89950/950A Hardware Manual

F2mc-8l 8-bit microcontroller
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.
I 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.
Immediately before
interrupt
0870
PS
E000
PC
SP
I 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.
Figure 3.4-5 Stack operation at start of interrupt processing
Address Memory
027C
XXH
H
H
027D
H
XXH
027E
H
XXH
H
027F
XXH
H
0280
0280
H
XXH
H
0281
XXH
H
Immediately after
interrupt
Address Memory
027C
027C
SP
H
H
027D
H
0870
PS
027E
H
H
027F
H
E000
PC
H
0280
H
0281
H
CHAPTER 3 CPU
08
H
PS
70
H
E0
H
PC
00
H
XXH
XXH
41

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb89950 seriesMb89950a series

Table of Contents