Extended Instructions
4-142
16-Bit MSP430X CPU
RRCM.A
Rotate Right through carry the 20-bit CPU register content
RRCM[.W]
Rotate Right through carry the 16-bit CPU register content
Syntax
RRCM.A
#n,Rdst
1
≤
n
≤
4
RRCM.W
#n,Rdst
or RRCM #n,Rdst
1
≤
n
≤
4
Operation
C
→
MSB
→
MSB-1
→
... LSB+1
→
LSB
→
C
Description
The destination operand is shifted right by one, two, three, or four bit positions
as shown in Figure 4−50. The carry bit C is shifted into the MSB, the LSB is
shifted into the carry bit. The word instruction RRCM.W clears the bits
Rdst.19:16
Note : This instruction does not use the extension word.
Status Bits
N:
Set if result is negative
.A: Rdst.19 = 1, reset if Rdst.19 = 0
.W: Rdst.15 = 1, reset if Rdst.15 = 0
Z:
Set if result is zero, reset otherwise
C:
Loaded from the LSB (n = 1), LSB+1 (n = 2), LSB+2 (n = 3) or LSB+3
(n = 4)
V: Reset
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
The address-word in R5 is shifted right by three positions. The MSB-2 is
loaded with 1.
SETC
; Prepare carry for MSB-2
RRCM.A
#3,R5
; R5 = R5
»
3 + 20000h
Example
The word in R6 is shifted right by two positions. The MSB is loaded with the
LSB. The MSB-1 is loaded with the contents of the carry flag.
RRCM.W
#2,R6
; R6 = R6
»
2. R6.19:16 = 0
Figure 4−50. Rotate Right Through Carry RRCM[.W] and RRCM.A
C
19
0
MSB
0
15
LSB
C
19
0
MSB
LSB
16
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...