16 bit Assembly
Home Site Map Instruction Index
The RCL instruction is used to rotate the bits to the left.
This command has 3 part the Instruction, A Register or memory address, and the number of bits to rotate left.
As each bit is rotated it passes in to the Carry flag, where it can be assessed using a conditional jump JC or JNC.
As each bit moves off the highest bit it is inserted in the lowest bit.
Assembly Sample | Description | 16 bit Machine Code |
---|---|---|
RCL AL, 1 | ; Rotate AL left by 1 bit | D0 D0 |
RCL AL, CL | ; Rotate AL left by value of CL | D2 D0 |
RCL AL, 0x03 | ; Rotate AL left by 8 bit immediate | C0 D0 03 |
RCL AX, 1 | ; Rotate AX left by 1 bit | D1 D0 |
RCL AX, CL | ; Rotate AX left by value of CL | D3 D0 |
RCL AX, 0x03 | ; Rotate AX left by 8 bit immediate | C1 D0 03 |
RCL [BX], 1 | ; Rotate memory address left by 1 bit | D0 17 |
RCL [BX], CL | ; Rotate memory address left by value of CL | D2 17 |
RCL [BX], 0x03 | ; Rotate memory address left by 8 bit immediate | C0 17 03 |
RCL [BX+2], 1 | ; Rotate memory address left by 1 bit | D0 57 02 |
RCL [BX+2], CL | ; Rotate memory address left by value of CL | D2 57 02 |
RCL [BX+2], 0x03 | ; Rotate memory address left by 8 bit immediate | C0 57 02 03 |