Download Print this page

Siemens C16 Series Instruction Set Manual page 103

16-bit cmos single-chip microcontrollers

Advertisement

ROR
Syntax
Operation
Data Types
Description
Condition Flags
Addressing Modes
Semiconductor Group
30Mar98@15:00h
Rotate Right
ROR
op1, op2
(count) ← (op2)
(C) ← 0
(V) ← 0
DO WHILE (count) ≠ 0
(V) ← (V) ∨ (C)
(C) ← (op1
)
0
) ← (op1
(op1
) [n=0...14]
n
n+1
) ← (C)
(op1
15
(count) ← (count) - 1
END WHILE
WORD
Rotates the destination word operand op1 right by as many times as spec-
ified by the source operand op2. Bit 0 is rotated into Bit 15 and into the
Carry. Only shift values between 0 and 15 are allowed. When using a
GPR as the count control, only the least significant 4 bits are used.
E
Z
0
*
E Always cleared.
Z Set if result equals zero. Cleared otherwise.
V Set if in any cycle of the rotate operation a '1' is shifted out of the carry
flag. Cleared for a rotate count of zero.
C The carry flag is set according to the last LSB shifted out of op1.
Cleared for a rotate count of zero.
N Set if the most significant bit of the result is set. Cleared otherwise.
Mnemonic
ROR
Rw
, Rw
n
ROR
Rw
, #data4
n
C166 Family Instruction Set
V
C
N
S
S
*
Format
2C nm
m
3C #n
103
Instruction Description
ROR
Version 1.2, 12.97
Bytes
2
2

Hide quick links:

Advertisement

loading