Slide 16.6: ROR instruction
Home

RCL and RCR Instructions


The RCL (rotate carry left) instruction shifts each bit to the left, copies the Carry flag to the least significant bit (LSB), and copies the most significant bit (MSB) into the Carry flag.

 RCL — Rotate Through Carry Left 
Usage: rcl dest, count


Flag O D I S Z A P C
Result *             *

Rotates the bits in the destination to the left “count” times with all data pushed out the left side re-entering on the right. The Carry flag holds the last bit rotated out.

Clocks
Operands 286 386 486 Size Bytes
reg, 1 2 9 3 2
mem, 1 7 10 4 2–4
reg, CL 5+n 9 8–30 2
mem, CL 8+n 10 9–31 2-4
reg, immed8 5+n 9 8–30 3
mem, immed8 8+n 10 9–31 3-5

RCR Instruction


The RCR (rotate carry right) instruction shifts each bit to the right, copies the Carry flag to the MSB, and copies the LSB into the Carry flag.

 RCR — Rotate Through Carry Right 
Usage: rcr dest, count


Flag O D I S Z A P C
Result *             *

Rotates the bits in the destination to the right “count” times with all data pushed out the right side re-entering on the left. The Carry flag holds the last bit rotated out.

Clocks
Operands 286 386 486 Size Bytes
reg, 1 2 9 3 2
mem, 1 7 10 4 2–4
reg, CL 5+n 9 8–30 2
mem, CL 8+n 10 9–31 2-4
reg, immed8 5+n 9 8–30 3
mem, immed8 8+n 10 9–31 3-5