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
201
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
CPUX
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 1 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 1 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