MB95630H Series
80
FUJITSU SEMICONDUCTOR LIMITED
MN702-00009-1v0-E
CHAPTER 5 INTERRUPTS
5.1 Interrupts
5.1.6
Interrupt Processing Stack Area
The stack area in RAM is used for interrupt processing. The stack pointer (SP)
contains the start address of the stack area.
■
Interrupt Processing Stack Area
The stack area is also used for saving and restoring the program counter (PC) when the
subroutine call instruction (CALL) or the vector call instruction (CALLV) is executed, and for
saving temporarily and restoring register contents by the PUSHW and POPW instructions.
•
The stack area is secured on the RAM together with the data area.
•
Initialize the stack pointer (SP) so that it indicates the biggest RAM address and make the
data area start from the smallest RAM address.
Figure 5.1-5 shows an example of setting the interrupt processing stack area.
Figure 5.1-5 Example of Setting Interrupt Processing Stack Area
Note:
The stack area is utilized by interrupts, sub-routine calls, the PUSHW instruction, etc. in
descending order of addresses. It is released by return instructions (RETI, RET), the
POPW instruction, etc. in ascending order of addresses. If the address value of the stack
area used decreases due to nested interrupts or subroutine calls, do not let the stack
area overlap the data area and the general-register area, both of which retain other data.
0x0000
I/O
RAM
Gener
a
l-
p
u
rpo
s
e
regi
s
ter
Fl
as
h
memory
S
t
a
ck
a
re
a
Recommended
S
P v
a
l
u
e
(when the
b
igge
s
t RAM
a
ddre
ss
i
s
0x02
8
0)
Addre
ss
e
s
v
a
ry
a
mong prod
u
ct
s
. For det
a
il
s
,
refer to the device d
a
t
a
s
heet.
D
a
t
a
a
re
a
Acce
ss
prohi
b
ited
0x00
8
0
0x0100
0x0200
0x02
8
0
0xFFFF