3-625
INSTRUCTION SET REFERENCE
SAL/SAR/SHL/SHRShift (Continued)
ELSE IF COUNT = 0
THEN
All flags remain unchanged;
ELSE (* COUNT neither 1 or 0 *)
OF
<
undefined;
FI;
FI;
Flags Affected
The CF flag contains the value of the last bit shifted out of the destination operand; it is unde-
fined for SHL and SHR instructions where the count is greater than or equal to the size (in bits)
of the destination operand. The OF flag is affected only for 1-bit shifts (refer to Description
above); otherwise, it is undefined. The SF, ZF, and PF flags are set according to the result. If the
count is 0, the flags are not affected. For a non-zero count, the AF flag is undefined.
Protected Mode Exceptions
#GP(0)
If the destination is located in a nonwritable segment.
If a memory operand effective address is outside the CS, DS, ES, FS, or
GS segment limit.
If the DS, ES, FS, or GS register contains a null segment selector.
#SS(0)
If a memory operand effective address is outside the SS segment limit.
#PF(fault-code)If a page fault occurs.
#AC(0)
If alignment checking is enabled and an unaligned memory reference is
made while the current privilege level is 3.
Real-Address Mode Exceptions
#GP
If a memory operand effective address is outside the CS, DS, ES, FS, or
GS segment limit.
#SS
If a memory operand effective address is outside the SS segment limit.