
SAR SHIFT ARITHMETIC SAR
RIGHT
Operation: | Flags Affected: |
(temp) | CF, OF, PF, SF, ZF. |
do while (temp) "* 0 | AF undefined |
(CF) |
|
(EA) |
|
equivalentto signed division, |
|
rounding down |
|
(temp) |
|
if COUNT = 1 then |
|
if |
|
| |
then |
|
else (OF) |
|
else (OF) |
|
Description:
SAR destination, count
SAR (Shift Arithmetic Right) shifts the bits in the destination op~rand (byte or word) to the
right by the number of bits specified in the count operand. Bits equal to the original high- order (sign) bit are shifted in on the left, preserving the sign of the original value. Note that SAR does not produce the same result as the dividend of an "equivalent" IDIV instruc-
tion if the destination operand is negative and