General−Purpose Registers R4 - R15 - Texas Instruments MSP430x1xx User Manual

Texas instruments modules and peripherals user's guide
Table of Contents

Advertisement

CPU Registers
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
Example Register-Byte Operation
R5 = 0A28Fh
R6 = 0203h
Mem(0203h) = 012h
ADD.B
Mem (0203h) = 0A1h
C = 0, Z = 0, N = 1
+ (Addressed byte)
−>(Addressed byte)
3-8
RISC 16-Bit CPU
Register-Byte Operation
High Byte
Low Byte
Unused
Register
Memory
Byte
R5,0(R6)
08Fh
+ 012h
0A1h
(Low byte of register)
Byte-Register Operation
High Byte
Low Byte
Byte
0h
Example Byte-Register Operation
R5 = 01202h
R6 = 0223h
Mem(0223h) = 05Fh
ADD.B
@R6,R5
05Fh
+ 002h
00061h
R5 = 00061h
C = 0, Z = 0, N = 0
(Addressed byte)
+ (Low byte of register)
−>(Low byte of register, zero to High byte)
Memory
Register

Advertisement

Table of Contents
loading

Table of Contents