Datasheet
CPU Registers
MC68HC812A4 Data Sheet, Rev. 7
Freescale Semiconductor 45
3.3.3 Index Registers X and Y
Index registers X and Y are used for indexed addressing. Indexed addressing adds the value in an index
register to a constant or to the value in an accumulator to form the effective address of the operand.
Index registers X and Y can also serve as temporary data storage locations.
3.3.4 Stack Pointer
The stack pointer (SP) contains the last stack address used. The CPU12 supports an automatic program
stack that is used to save system context during subroutine calls and interrupts.
The stack pointer can also serve as a temporary data storage location or as an index register for indexed
addressing.
3.3.5 Program Counter
The program counter contains the address of the next instruction to be executed.
The program counter can also serve as an index register in all indexed addressing modes except
autoincrement and autodecrement.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 Bit 0
X15 X14 X13 X12 X11 X10 X9 X8 X7 X6 X5 X4 X3 X2 X1 X0
Reset:
Unaffected by reset
Figure 3-5. Index Register X (X)
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 Bit 0
Y15 Y14 Y13 Y12 Y11 Y10 Y9 Y8 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
Reset:
Unaffected by reset
Figure 3-6. Index Register Y (Y)
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 Bit 0
SP15 SP14 SP13 SP12 SP11 SP10 SP9 SP8 SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0
Reset:
Unaffected by reset
Figure 3-7. Stack Pointer (SP)
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 Bit 0
SP15 SP14 SP13 SP12 SP11 SP10 SP9 SP8 SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0
Reset:
Unaffected by reset
Figure 3-8. Program Counter (PC)
