Instruction Set Description
243
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
CPUX
4.6.3.28 RRCX
RRCX.A
Rotate right through carry the 20-bit operand
RRCX.[W]
Rotate right through carry the 16-bit operand
RRCX.B
Rotate right through carry the 8-bit operand
Syntax
RRCX.A Rdst
RRCX.W Rdst
RRCX Rdst
RRCX.B Rdst
RRCX.A dst
RRCX dst
or
RRCX.W dst
RRCX.B dst
Operation
C
→
MSB
→
MSB–1 ... LSB+1
→
LSB
→
C
Description
Register mode for the destination: the destination operand is shifted right by 1 bit
position as shown in
. The word instruction RRCX.W clears the bits
Rdst.19:16, the byte instruction RRCX.B clears the bits Rdst.19:8. The carry bit C is
shifted into the MSB, the LSB is shifted into the carry bit.
All other modes for the destination: the destination operand is shifted right by 1 bit
position as shown in
. The carry bit C is shifted into the MSB, the LSB is
shifted into the carry bit. All addressing modes, with the exception of the immediate
mode, are possible in the full memory.
Status Bits
N:
Set if result is negative
.A: dst.19 = 1, reset if dst.19 = 0
.W: dst.15 = 1, reset if dst.15 = 0
.B: dst.7 = 1, reset if dst.7 = 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
The 20-bit operand at address EDE is shifted right by 1 position. The MSB is loaded
with 1.
SETC
; Prepare carry for MSB
RRCX.A
EDE
; EDE = EDE » 1 + 80000h
Example
The word in R6 is shifted right by 12 positions.