CPU Registers
3-8
RISC 16-Bit CPU
3.2.5 General−Purpose Registers R4 - R15
The twelve registers, R4−R15, are general-purpose registers. All of these
registers can be used as data registers, address pointers, or index values and
can be accessed with byte or word instructions as shown in Figure 3−7.
Figure 3−7. Register-Byte/Byte-Register Operations
Unused
High Byte Low Byte
Byte
Register-Byte Operation
0h
High Byte Low Byte
Byte
Byte-Register Operation
Register
Memory
Register
Memory
Example Register-Byte Operation Example Byte-Register Operation
R5 = 0A28Fh R5 = 01202h
R6 = 0203h R6 = 0223h
Mem(0203h) = 012h Mem(0223h) = 05Fh
ADD.B R5,0(R6) ADD.B @R6,R5
08Fh 05Fh
+ 012h + 002h
0A1h
00061h
Mem (0203h) = 0A1h R5 = 00061h
C = 0, Z = 0, N = 1 C = 0, Z = 0, N = 0
(Low byte of register) (Addressed byte)
+ (Addressed byte) + (Low byte of register)
−>(Addressed byte)
−>(Low byte of register, zero to High byte)