Texas Instruments MSP430x4xx Family User Manual page 99

Hide thumbs Also See for MSP430x4xx Family:
Table of Contents

Advertisement

RRC[.W]
RRC.B
Syntax
Operation
Description
Figure 3−17. Destination Operand—Carry Right Shift
Status Bits
Mode Bits
Example
Example
Rotate right through carry
Rotate right through carry
RRC
dst
or
RRC
dst
C −> MSB −> MSB−1 .... LSB+1 −> LSB −> C
The destination operand is shifted right one position as shown in Figure 3−17.
The carry bit (C) is shifted into the MSB, the LSB is shifted into the carry bit (C).
Word
15
C
Byte
7
N: Set if result is negative, reset if positive
Z: Set if result is zero, reset otherwise
C: Loaded from the LSB
V: Reset
OSCOFF, CPUOFF, and GIE are not affected.
R5 is shifted right one position. The MSB is loaded with 1.
SETC
RRC
R5
R5 is shifted right one position. The MSB is loaded with 1.
SETC
RRC.B
R5
RRC.W
dst
; Prepare carry for MSB
; R5/2 + 8000h −> R5
; Prepare carry for MSB
; R5/2 + 80h −> R5; low byte of R5 is used
RISC 16-Bit CPU
Instruction Set
0
0
3-61

Advertisement

Table of Contents
loading

Table of Contents