x86 shift and rotate instructions Flashcards
This shifts the source operand to the left from 1 to 31 bit positions, while the empty bit positions are cleared. Then the CF flag is loaded with the last bit shifted out of the operand
SAL Op, Qty
This shifts the source operand to the right from 1to 31 bit positions, while the empty bit positions are cleared if the operand is positive (+) and set if the operand is negative (-). Then, the CF flag is loaded with the last bit shifted out of the operand
SAR Op, Qty
This shifts the source operand right by from 1 to 31 bit positions, while empty bit positions are cleared, and the CF flag is loaded with the last bit shifted out
SHR Op, Qty
This rotates bits to the left, with wraparound. Then, the CF flag is loaded with the last bit shifted out of the operand.
ROL Op, Qty
This rotates bits to the right, with wraparound. Then, the CF flag is loaded with the last bit shifted out of the operand.
ROR Op, Qty
This rotates bits to the left, including the CF flag, with wraparound. This instruction treats the CF flag as a 1-bit extension on the upper end of the operand.
RCL Op, Qty
This rotates bits to the right, including the CF flag, with wraparound. This instruction treats the CF flag as a 1-bit extension on the lower end of the operand.
RCR Op, Qty