This document discusses shift instructions in the 8088 instruction set, including SHL/SAL for shifting bits left while filling vacated right bits with zeros, SHR for shifting bits right and filling vacated left bits with zeros, and SAR for shifting bits right and filling vacated left bits with the most significant bit. All three shift instructions affect the CF, OF, PF, SF, and ZF flags, while the AF flag is undefined.
1 of 4
Download to read offline
More Related Content
Chapter 9 the 8088 instruction set vi - shift instructions
2. SHL/SAL
Meaning Format Operation Flags Affected
Shift Logical Left/
Shift Arithmetic Left
SHL D, count
SAL D, count
Shift the
destination to the
left by the number
of bit positions
equal to Count
and fill the
vacated bits
positions on the
right with 0’s
CF, OF, PF, SF,
ZF
AF is undefined
3. SHR
Meaning Format Operation Flags Affected
Shift Logical Right SHR D, count Shift the
destination to the
right by the
number of bit
positions equal to
Count and fill the
vacated bits
positions on the
left with 0’s
CF, OF, PF, SF,
ZF
AF is undefined
4. SAR
Meaning Format Operation Flags Affected
Shift Arithmetic
Right
SAR D, count Shift the
destination to the
right by the
number of bit
positions equal to
Count and fill the
vacated bits
positions on the
left with the most
significant bit
CF, OF, PF, SF,
ZF
AF is undefined