You are here : assembly8086RCL

RCL - 8086

Rotate operand1 left through Carry Flag. The number of rotates is set by operand2.

When immediate is greater then 1, assembler generates several RCL xx, 1 instructions because 8086 has machine code only for this instruction (the same principle works for all other shift/rotate instructions).

Algorithm:

  • shift all bits left, the bit that goes off is set to CF and previous value of CF is inserted to the right-most position.


Syntax

RCL memory, immediate
RCL REG, immediate
RCL memory, CL
RCL REG, CL 


Example

STC ; set carry (CF=1).
MOV AL, 1Ch ; AL = 00011100b
RCL AL, 1 ; AL = 00111001b, CF=0.
RET 


Output / Return Value


Limitations


Alternatives / See Also


Reference