Freescale Semiconductor, Inc.
Central Processor Unit (CPU)
The index register can serve also as a temporary data storage location.
Bit
Bit
0
15 14 13 12 11 10
9
0
8
0
7
6
5
4
3
2
1
Read:
Write:
Reset:
0
0
0
0
0
0
X
X
X
X
X
X
X
X
X = Indeterminate
Figure 5-3. Index Register (H:X)
5.4.3 Stack Pointer
The stack pointer is a 16-bit register that contains the address of the next
location on the stack. During a reset, the stack pointer is preset to
$00FF. The reset stack pointer (RSP) instruction sets the least
significant byte (LSB) to $FF and does not affect the most significant
byte (MSB). The stack pointer decrements as data is pushed onto the
stack and increments as data is pulled from the stack.
In the stack pointer 8-bit offset and 16-bit offset addressing modes, the
stack pointer can function as an index register to access data on the
stack. The CPU uses the contents of the stack pointer to determine the
conditional address of the operand.
Bit
Bit
0
15 14 13 12 11 10
9
0
8
0
7
1
6
1
5
1
4
1
3
1
2
1
1
1
Read:
Write:
Reset:
0
0
0
0
0
0
1
Figure 5-4. Stack Pointer (SP)
NOTE: For correct operation, the stack pointer must point only to RAM
locations.
Advance Information
66
MC68HC908RFRK2
MOTOROLA
Central Processor Unit (CPU)
For More Information On This Product,
Go to: www.freescale.com