Register Stack Pointer (Rsp) And Register Stack - Oki ML63611 User Manual

Table of Contents

Advertisement

ML63611 User's Manual
Chapter 2 CPU and Memory Spaces

2.2.8 Register Stack Pointer (RSP) and Register Stack

The register stack pointer (RSP) is a pointer that indicates the register stack address for saving various registers.
RSP is a 4-bit up/down counter that is incremented during stack saves (execution of PUSH instructions) and is
decremented during stack restores (execution of POP instructions).
The register stack has 16 levels from address 0H to address 0FH. The contents of the register stack cannot be read
or written by the program.
Figure 2-4 shows the relation between RSP and the register stack.
3
Register stack pointer
The various registers shown in Figure 2-5 are saved onto and restored from the register stack by PUSH and POP
instructions.
"PUSH HL" and "POP HL" instruction execution
15
"PUSH XY" and "POP XY" instruction execution
15
Figure 2-5 Register Save/Restore by Execution of PUSH/POP Instructions
RSP is assigned to special function register (SFR) address 0F6H.
RSP (0F6H)
(R/W)
At system reset, RSP is initialized to "0" and points to address "0H" of the register stack.
OPTION A (C): 1.5 V (3.0 V), Without regulator
circuit for LCD bias
2
1
0
RSP
Figure 2-4 Relation between RSP and Register Stack
14
13
12
11
10
G
C
Z
A
14
13
12
11
10
EBR
CBR
bit 3
rsp3
Register stack
16 bits
9
8
7
6
5
4
H
Register stack
9
8
7
6
5
4
X
Register stack
bit 2
bit 1
rsp2
rsp1
2 – 6
OPTION B (D): 1.5 V (3.0 V), With regulator
0FH
16 levels
0H
3
2
1
0
L
3
2
1
0
Y
bit 0
rsp0
circuit for LCD bias

Advertisement

Table of Contents
loading

Table of Contents