mc68hc908qf4 Freescale Semiconductor, Inc, mc68hc908qf4 Datasheet - Page 61

no-image

mc68hc908qf4

Manufacturer Part Number
mc68hc908qf4
Description
M68hc08 Microcontrollers Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
7.3.2 Index Register
7.3.3 Stack Pointer
MC68HC908QF4 — Rev. 1.0
MOTOROLA
NOTE:
The 16-bit index register allows indexed addressing of a 64-Kbyte memory space.
H is the upper byte of the index register, and X is the lower byte. H:X is the
concatenated 16-bit index register.
In the indexed addressing modes, the CPU uses the contents of the index register
to determine the conditional address of the operand.
The index register can serve also as a temporary data storage location.
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 to $FF and does not affect
the most significant byte. 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.
The location of the stack is arbitrary and may be relocated anywhere in
random-access memory (RAM). Moving the SP out of page 0 ($0000 to $00FF)
frees direct address (page 0) space. For correct operation, the stack pointer must
point only to RAM locations.
Reset:
Reset:
Read:
Read:
Write:
Write:
Freescale Semiconductor, Inc.
X = Indeterminate
Bit
Bit
15
15
0
0
For More Information On This Product,
14
14
0
0
13
13
Go to: www.freescale.com
0
0
Central Processor Unit (CPU)
Figure 7-3. Index Register (H:X)
12
12
0
0
Figure 7-4. Stack Pointer (SP)
11
11
0
0
10
10
0
0
9
0
9
0
8
8
0
0
7
X
7
1
6
X
6
1
5
X
5
1
Central Processor Unit (CPU)
4
X
4
1
X
3
3
1
X
2
2
1
CPU Registers
X
1
1
1
Data Sheet
Bit
Bit
X
0
0
1
61

Related parts for mc68hc908qf4