MB95630H Series
MN702-00009-2v0-E
FUJITSU SEMICONDUCTOR LIMITED
79
CHAPTER 5 INTERRUPTS
5.1 Interrupts
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
■
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.
Immediately before interrupt
SP
Memory
0xXX
Address
Immediately after interrupt
PC
PS
Memory
Address
}
}
PC
PS
0xXX
0xXX
0xXX
0xXX
0xXX
0x08
0x70
0xE0
0x00
0xXX
0xXX
0x0870
0xE000
0x0280
SP
PC
PS
0x027C
0x0870
0xE000
0x027C
0x0281
0x027D
0x027E
0x027F
0x0280
0x027C
0x0281
0x027D
0x027E
0x027F
0x0280
Содержание 8FX
Страница 2: ......
Страница 4: ......
Страница 8: ...iv ...
Страница 17: ...xiii A 3 Bit Manipulation Instructions SETB CLRB 621 A 4 F2 MC 8FX Instructions 622 A 5 Instruction Map 625 ...
Страница 18: ...xiv ...
Страница 22: ...xviii ...
Страница 108: ...MB95630H Series 86 FUJITSU SEMICONDUCTOR LIMITED MN702 00009 2v0 E CHAPTER 6 I O PORT 6 2 Configuration and Operations ...
Страница 284: ...MB95630H Series 262 FUJITSU SEMICONDUCTOR LIMITED MN702 00009 2v0 E CHAPTER 14 LIN UART 14 8 Notes on Using LIN UART ...
Страница 648: ...MB95630H Series 626 FUJITSU SEMICONDUCTOR LIMITED MN702 00009 2v0 E APPENDIX A Instruction Overview A 5 Instruction Map ...
Страница 650: ......