-
Same as SHR, except that most-significant bit (MSB) is shifted back to itself.
-
This preserves the original sign of the destination operand, because MSB is the sign bit.
-
Each shift divides the destination operand by 2, while preserving the sign.
-
For example,
mov cl, -74 ; 2's complement of -74 is 0B6h
sar cl, 1 ; CL is now -37, or 0DBh
-
Note that LSB is shifted into the carry flag CF.
|
-
Operation of SAR CL, 1 :
|