XC886/888CLM
Processor Architecture
User’s Manual
2-3
V1.3, 2010-02
Processor Architecture, V 1.0
The program control section controls the sequence in which the instructions stored in
program memory are executed. The 16-bit Program Counter (PC) holds the address of
the next instruction to be executed. The conditional branch logic enables internal and
external events to the processor to cause a change in the program execution sequence.
2.2
CPU Register Description
The CPU registers occupy direct Internal Data Memory space locations in the range 80
H
to FF
H
.
2.2.1
Stack Pointer (SP)
The SP register contains the Stack Pointer (SP). The SP is used to load the Program
Counter (PC) into Internal Data Memory during LCALL and ACALL instructions, and to
retrieve the PC from memory during RET and RETI instructions. Data may also be saved
on or retrieved from the stack using PUSH and POP instructions, respectively.
Instructions that use the stack automatically pre-increment or post-decrement the stack
pointer so that the stack pointer always points to the last byte written to the stack, i.e.,
the top of the stack. On reset, the SP is reset to 07
H
. This causes the stack to begin at a
location = 08
H
above register bank zero. The SP can be read or written under software
control.
2.2.2
Data Pointer (DPTR)
The Data Pointer (DPTR) is stored in registers DPL (Data Pointer Low byte) and DPH
(Data Pointer High byte) to form 16-bit addresses for External Data Memory accesses
(MOVX A,@DPTR and MOVX @DPTR,A), for program byte moves
(MOVC A,@A+DPTR), and for indirect program jumps (JMP @A+DPTR).
Two true 16-bit operations are allowed on the Data Pointer: load immediate
(MOV DPTR,#data) and increment (INC DPTR).
2.2.3
Accumulator (ACC)
This register provides one of the operands for most ALU operations.
2.2.4
B Register
The B register is used during multiply and divide operations to provide the second
operand. For other instructions, it can be treated as another scratch pad register.
*