Fig. 2.18 Stack Operation Instructions And Stack Pointers - Fujitsu MB90420/5 (A) Series Hardware Manual

F2mc-16lx family 16-bit microcontrollers
Table of Contents

Advertisement

MB90420/5 (A) SERIES F
Figure 2.18 shows an example of the stack operation using the system stack.
PUSHW A when S flag = 0
Before execution
AL
After execution
AL
PUSHW A when S flag = 1
Before execution
AL
After execution
AL
X
: Undefined
MSB : Most Significant Bit
LSB : Least Significant Bit
Notes: 1. Use even addresses for setting value to the stack pointer. When an odd address is set, the word
access is divided into two accesses, decreasing the efficiency.
2. The initial values of the USP and SSP registers are undefined after a reset.
n System stack pointer (SSP)
When using the system stack pointer (SSP), set the S flag of the condition code register (CCR) in the
processor status (PS) to 1. In this case, the upper 8 bits of the address used for the stack operation are
indicated by the system stack bank register (SSB).
n User stack pointer (USP)
When using the user stack pointer (USP), set the S flag of the condition code register (CCR) in the processor
status (PS) to 0. In this case, the upper 8 bits of the address used for the stack operation are indicated by
the user stack bank register (USB).
2
MC-16LX FAMILY 16-BIT MICROCONTROLLERS HARDWARE MANUAL
USB
A624
C6
H
H
S flag
SSB
0
56
H
USB
A624
C6
H
H
S flag
SSB
0
56
H
USB
A624
C6
H
H
S flag
SSB
1
56
H
USB
A624
C6
H
H
S flag
SSB
1
56
H

Fig. 2.18 Stack Operation Instructions and Stack Pointers

C6F326
USP
F328
H
SSP
1234
H
User stack used because S flag = 0
USP
F326
H
SSP
1234
C6F326
H
561232
USP
F328
H
SSP
1234
H
USP
F328
561232
H
SSP
1232
System stack used because S flag = 1
H
2-20
MSB
LSB
XX
XX
H
H
H
A6
24
H
H
H
MSB
LSB
XX
XX
H
H
H
A6
24
H
H
H

Advertisement

Table of Contents
loading

Table of Contents