Stack Operation During Interrupt Processing - Fujitsu MB95630H Series Hardware Manual

8-bit microcontroller new 8fx
Hide thumbs Also See for MB95630H Series:
Table of Contents

Advertisement

MB95630H Series
5.1.5

Stack Operation During Interrupt Processing

This section describes how the contents of a register are saved and restored
during interrupt processing.
■ Stack Operation at the Start of Interrupt Processing
Once the CPU accepts an interrupt, it automatically saves the current value of the program
counter (PC) and that of the program status (PS) values to the stack.
Figure 5.1-4 shows the stack operation at the start of interrupt processing.
Figure 5.1-4 Stack Operation at Start of Interrupt Processing
Immediately before interrupt
PS
0x0870
PC
0xE000
SP
0x0280
■ Stack Operation after Returning from Interrupt
When the CPU executes the interrupt return instruction (RETI) at the end of interrupt
processing, it restores from the stack the value of the program status (PS) first and that of the
program counter (PC), which is opposite to the sequence of saving the two values to the stack.
After the restoration, both PS and PC return to their states before the start of interrupt
processing.
Note:
Since the value of the accumulator (A) and that of the temporary accumulator (T) are not
automatically saved to the stack, use the PUSHW and POPW instructions to save and
restore the values of A and T.
MN702-00009-1v0-E
Address
Memory
0x027C
0xXX
0x027D
0xXX
0x027E
0xXX
0x027F
0xXX
0x0280
0xXX
0x0281
0xXX
FUJITSU SEMICONDUCTOR LIMITED
CHAPTER 5 INTERRUPTS
Immediately after interrupt
Address
SP
0x027C
0x027C
0x027D
PS
0x0870
0x027E
0x027F
PC
0xE000
0x0280
0x0281
5.1 Interrupts
Memory
}
0x08
PS
0x70
}
0xE0
PC
0x00
0xXX
0xXX
79

Advertisement

Table of Contents
loading

Table of Contents