Computer Hardware User's Guide

Rotate Right
ROR
13-207
Assembly Language Instructions
Syntax ROR
dst
Operation
dst
right-rotated one bit through carry bit
dst
Operands
dst
register (R
n
, 0
n
27)
Opcode
31 24 23 16 8 7 015
000 10 0
1 10
dst
11 11 11 1 1 1 11 11 11 111
Description The contents of the
dst
operand are right rotated one bit and loaded into the
dst
register. The LSB is rotated into the carry (C) bit and also transferred into
the MSB.
Rotate right:
C
dst
Cycles 1
Status Bits These condition flags are modified only if the destination register is R7–R0.
LUF Unaffected
LV Unaffected
UF 0
N MSB of the output
Z 1 if a 0 output is generated; 0 otherwise
V 0
C Set to the value of the bit rotated out of the high-order bit; unaffected
if
dst
is not R7–R0
OVM Operation is not affected by OVM bit value.
Example ROR R7
Before Instruction After Instruction
R7 00 0000 0421 R7 00 8000 0210
LUF 0 LUF 0
LV 0 LV 0
UF 0 UF 0
N 0 N 1
Z 0 Z 0
V 0 V 0
C 0 C 1
Mode Bit