42
CHAPTER 3 CPU
3.4.6
Stack Area for Interrupt Processing
Interrupt processing execution uses the stack area in RAM. The contents of the stack
pointer (SP) specifies the top address of the stack area.
■
Stack area for interrupt processing
The subroutine call instruction (CALL) and vector call instruction (CALLV) use the stack area to save and
restore the program counter (PC). The stack area is also used by the PUSHW and POPW instructions to
temporarily save and restore registers.
•
The stack area is located in RAM along with the data area.
•
Initializing the stack pointer (SP) to the top address of RAM and allocating data areas upwards from the
bottom RAM address is recommended.
Figure 3.4-6 "Stack area for interrupt processing" shows the example of stack area setting.
Figure 3.4-6 Stack area for interrupt processing
Note:
The stack area is used in the downward direction starting from a high address by functions such as
interrupts, subroutine calls, and the PUSHW instruction. Instructions such as return instructions (RETI,
RET) and the POPW instruction release stack area in the upward direction. Take care when the stack
address is decreased by multiple interrupts or subroutine calls that the stack does not overlap the
general-purpose register area or areas containing other data.
General-
purpose
registers
I/O
RAM
Access
ROM
0000
H
0080
H
0100
H
0200
H
FFFF
H
Recommended set value for SP
Data area
Stack area
(When the top address of RAM is 0280
H.
)
prohibited
0280
H
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: ......