Download Print this page

Siemens C16 Series Instruction Set Manual page 102

16-bit cmos single-chip microcontrollers

Advertisement

ROL
Syntax
Operation
Data Types
Description
Condition Flags
Addressing Modes
Semiconductor Group
30Mar98@15:00h
Rotate Left
ROL
op1, op2
(count) ← (op2)
(C) ← 0
DO WHILE (count) ≠ 0
(C) ← (op1
)
15
) ← (op1
(op1
) [n=1...15]
n
n-1
) ← (C)
(op1
0
(count) ← (count) - 1
END WHILE
WORD
Rotates the destination word operand op1 left by as many times as speci-
fied by the source operand op2. Bit 15 is rotated into Bit 0 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 Always cleared.
C The carry flag is set according to the last MSB 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
ROL
Rw
, Rw
n
ROL
Rw
, #data4
n
C166 Family Instruction Set
V
C
N
0
S
*
Format
0C nm
m
1C #n
102
Instruction Description
Version 1.2, 12.97
ROL
Bytes
2
2

Hide quick links:

Advertisement

loading