
C
19
0
MSB
0
0
0
0
0
0
0
7
15
0
0
0
0
0
LSB
C
19
0
MSB
0
0
0
0
15
LSB
Instruction Set Description
4.6.2.41 RRC
RRC[.W]
Rotate right through carry destination word
RRC.B
Rotate right through carry destination byte
Syntax
RRC dst
or
RRC.W dst
RRC.B dst
Operation
C
→
MSB
→
MSB–1
→
... LSB+1
→
LSB
→
C
Description
The destination operand is shifted right by one bit position as shown in
. The
carry bit C is shifted into the MSB and the LSB is shifted into the carry bit C.
Status Bits
N:
Set if result is negative (MSB = 1), reset otherwise (MSB = 0)
Z:
Set if result is zero, reset otherwise
C:
Loaded from the LSB
V:
Reset
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
RAM word EDE is shifted right one bit position. The MSB is loaded with 1.
SETC
; Prepare carry for MSB
RRC
EDE
; EDE = EDE >> 1 + 8000h
Figure 4-41. Rotate Right Through Carry RRC.B and RRC.W
174
CPUX
SLAU272C – May 2011 – Revised November 2013
Copyright © 2011–2013, Texas Instruments Incorporated