Flags Affected

┌──┬──┬──┬──┬──┬──┬──┬──┐
│OF│DF│IF│SF│ZF│AF│PF│CF│
├──┼──┼──┼──┼──┼──┼──┼──┤
│* │  │  │* │* │? │* │* │
└──┴──┴──┴──┴──┴──┴──┴──┘

If count = 0, the flags are not affected.

The CF flag contains the value of the last bit shifted out. The CF flag is undefined for SHL and SHR instructions in which the shift lengths are greater than or equal to the size of the operand to be shifted.

The OF flag is affected for single shifts; the OF flag is undefined for multiple shifts; the CF, ZF, PF, and SF flags are set according to the result.


[Back: Operation]
[Next: Protected Mode Exceptions]