THE
80286
INSTRUCTION SET
RCLI
RCR
I ROLl ROR-Rotate
Instructions
Opcode Instruction
Clocks-N° Description
00
/2
RCL
eb,1
2,mem=7
Rotate 9-bits
(CF,
EA
byte) left once
02
/2
RCL
eb,CL*
5,mem=8
Rotate 9-bits
(CF,
EA
byte) left CL times
CO
/2
db
RCL eb,db*
5,mem=8
Rotate 9-bits
(CF,
EA
byte) left db times
01
/2
RCL
ew,1
2,mem=7
Rotate 17-bits
(CF,
EA
word) left once
03
/2
RCL ew,CL*
5,mem=8
Rotate 17-bits
(CF,
EA
word) left CL times
C1
/2
db RCL ew,db*
5,mem=8
Rotate 17-bits
(CF,
EA
word) left db times
00
/3
RCR
eb,1
2,mem=7
Rotate 9-bits
(CF,
EA
byte) right once
02
/3
RCR
eb,CL*
5,mem=8
Rotate 9-bits
(CF,
EA
byte) right CL times
CO
/3
db
RCR
eb,db*
5,mem=8
Rotate 9-bits
(CF,
EA
byte) right db times
01
/3
RCR
ew,1
2,mem=7
Rotate 17-bits
(CF,
EA
word) right once
03
/3
RCR
ew,CL*
5,mem=8
Rotate 17-bits
(CF,
EA
word) right CL times
C1
/3
db
RCR
ew,db*
5,mem=8
Rotate
17
-bits
(CF,
EA
word) right
db
times
00
/0
ROL
eb,1
2,mem=7
Rotate 8-bit
EA
byte left once
02
/0
ROL eb,CL*
5,mem=8
Rotate 8-bit
EA
byte left CL times
CO
/0
db
ROL eb,db*
5,mem=8
Rotate 8-bit
EA
byte left db times
01
/0
ROL
ew,1
2,mem=7
Rotate 16-bit
EA
word left once
03
/0
ROL ew,CL*
5,mem=8
Rotate 16-bit
EA
word left CL times
C1
/0
db
ROL ew,db*
5,mem=8
Rotate 16-bit
EA
word left db times
00
/1
ROR
eb,1
2,mem=7
Rotate 8-bit
EA
byte right once
02
/1
ROR
eb,CL*
5,mem=8
Rotate 8-bit
EA
byte right CL times
CO
/1
db
ROR
eb,db*
5,mem=8
Rotate 8-bit
EA
byte right db times
01
/1
ROR
ew,1
2,mem=7
Rotate 16-bit
EA
word right once
03
/1
ROR
ew,CL*
5,mem=8
Rotate 16-bit
EA
word right CL times
C1
/1
db
ROR
ew,db*
5,mem=8
Rotate 16-bit
EA
word right db times
* Add 1 clock to the times shown for each rotate made
FLAGS MODIFIED
Overflow (only for single rotates), carry
FLAGS UNDEFINED
Overflow for multi-bit rotates
OPERATION
Each rotate instruction shifts the bits of the register or memory operand given. The left rotate instruc-
tions shift all of the bits upward, except for the top bit, whIch comes back
arounu
LU
illt,
uuliuiii.
The
right rotate instructions
do
the reverse: the bits shift downward, with the bottom bit coming around to
the top.
For the
RCL
and
RCR
instructions, the carry flag
is
part of the rotated quantity.
RCL
shifts the carry
flag into the bottom bit and shifts the top bit into the carry flag;
RCR
shifts the carry flag into the top
bit and shifts the bottom bit into the carry flag. For the
ROL
and
ROR
instructions, the original value
of the carry flag
is
not a part of the result; nonetheless, the carry flag receives a copy of the bit
that
was shifted from one end to the other.
8-90