Stack Pointer (Usp, Ssp) - Fujitsu MB90895 Series Hardware Manual

16 bit, controller manual
Table of Contents

Advertisement

3.2.3

Stack Pointer (USP, SSP)

The stack pointers include a user stack pointer (USP) and a system stack pointer (SSP).
Both these pointers indicate the address where saved data and return data are stored
when the PUSH instruction, the POP instruction, and the subroutine are executed.
• The higher 8 bits of the stack address are set by the user stack bank register (USB) or
the system stack bank register (SSB).
• When the stack flag (PS: CCR: S) is "0", the USP and USB register are enabled. When
the stack flag is "1", the SSP and SSB register are enabled.
I Stack Selection
For the F
The addresses of the stack pointers are set by the stack flag of the condition code register (CCR: S) as
shown in Table 3.2-2 "Stack Address Specification".
Table 3.2-2 Stack Address Specification
S Flag
0
*
1
*:Reset value
Since the stack flag (CCR: S) is set to "1" by a reset, the system stack pointer is used after reset.
Ordinarily, the system stack pointer is used in processing the stack at the interrupt routine, and the user
stack pointer is used in processing the stack at other than an interrupt routine. When it is not necessary to
divide the stack space, use only the system stack pointer.
Note:
When an interrupt is accepted, the stack flag (CCR: S) is set and the system stack pointer is
always used.
2
MC-16LX family, two types of stack pointer can be used: system stack, and user stack.
Higher 8 Bits
User stack bank register (USB)
System stack bank register (SSB)
Stack Address
Lower 16 Bits
User stack pointer (USP)
System stack pointer (SSP)
CHAPTER 3 CPU
37

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-16lx

Table of Contents