ROL
ROTATE
LEFT
ROL
Operation:
(temp)
-
COUNT
do
while
(temp)"*
0
Flags Affected:
(CF) -
high-order
bit
of
(EA)
(EA)
- (EA) * 2 + (CF)
(temp)
-
(temp)-1
if
COUNT
= 1
then
if
high-order
bit
of
(EA)"* (CF)
then
(OF)-1
else
(OF) - 0
else
(OF)
undefined
Description:
ROL destination, count
ROL (Rotate Left) rotates the destination byte
or word left by the number
of
bits specified in
the count operand.
Encoding:
11101
OOvw
ImodOOOr/ml
if
v = 0
then
COUNT
= 1
else
COUNT
= (CL)
CF,OF
ROL Operands Clocks* Transfers Bytes
register,
.1
2 - 2
register,
CL
8+4/bit
- 2
memory, 1 15(23)+EA
2
2-4
memory,
CL
20(28)
+
EA
+
41
bit 2
2-4
ROL Coding Example
ROL
BX,1
ROL
DI,
CL
ROL
FLAG_BYTE [DI], 1
ROL
ALPHA,
CL
*b(w): where b denotes the number" of clock cycles for byte operands and
w denotes the number of
clock cycles for word operands.
2-140