Shift and Rotate Instructions
Name Description Code Operation operands operand size
shl Shift logical left shl op,quantity
shifs zeros from right (low) reg,const
reg,cl
mem,const
mem,cl

byte,byte
word,byte
dword,byte

sal Shift arithmetic left sal op,quantity
shr Shift logical right shr op,quantity shifs zeros from left (high)
sar Shift arithmetic right sar op,quantity shifs zeros from left (high) preserves the sign
shld Shift left double shld dest,source,count Shift dest to left while shifting bits from source in from the right reg,reg,const
reg,reg,cl
mem,reg,const
mem,reg,cl
word,word,byte
dword,dword,byte
shrd Shift right double shrd dest,source,count Shift dest to right while shifting bits from source in from the left
rol Rotate left rol op,quantity Rotate op left quantity times reg,const
reg,cl
mem,const
mem,cl
byte,byte
word,byte
dword,byte
ror Rotate right ror op,quantity Rotate op right quantity times
rcl Rotate left through Carry rcl op,quantity Rotate (CF, op) left quantity times
rcr Rotate right through Carry rcr op,quantity Rotate (CF, op) right quantity times
bswap reverse byte oder bswap op Reverses the byte order of a 32-bit register reg dword