Modifies flags: CF OF PF SF ZF (AF undefined)
.-. .---------------. .-.
|C|<----|7 <---------- 0|<----|0|
'-' '---------------' '-'
Shifts the destination left by "count" bits with zeroes shifted
in on right. The Carry Flag contains the last bit shifted out.
Usage: ROL dest,count
Modifies flags: CF OF
.-. .---------------.
|C|<-.--|7 <---------- 0|<-.
'-' | '---------------' |
'---------------------'
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 will contain the value of the last bit rotated out.
SHL eax,10
翻译成C就是: eax <<= 0x10;
ROL有点麻烦:
ROL(a, b)是:
a = ((unsigned int)a << b) | ((unsigned int)a >> (32 - b))