Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
RCL/RCR/ROL/ROR
◄Summary► ◄Detail► ◄Example► ◄Key to Flags►
──────────────────────────────────────────────────────────────────────────────
Rotate Flags: O D I T S Z A P C
═════════════════
± ±
Syntax: RCL dest,1
RCL dest,CL
RCL dest,number (80186/286/386 Only)
Rotates the bits in the destination operand the number of times
specified in the source operand. RCL and ROL rotate the bits left;
RCR and ROR rotate right.
ROL and ROR rotate the number of bits in the operand. For each
rotation, the leftmost or rightmost bit is copied to the carry flag as
well as rotated. RCL and RCR rotate through the carry flag. The
carry flag becomes an extension of the operand so that a 9-bit rotation
is done for 8-bit operands, or a 17-bit rotation for 16-bit operands.
On the 8088 and 8086, the source operand can be either CL or 1. On
the 80186-80386, the source operand can be CL or an 8-bit constant.
On the 80186-80386, rotate counts larger than 31 are masked off, but
on the 8088 and 8086, larger rotate counts are performed despite the
inefficiency involved. The overflow flag is only modified by
single-bit variations of the instruction; for multiple-bit variations
it is undefined.
-♦-