232k views
1 vote
What does sar do in assembly example

User Reesa
by
7.4k points

1 Answer

6 votes
SAR (Shift Arithmetic Right) performs a right arithmetic shift on its operand. The ROL instruction shifts each bit to the left, with the highest bit copied in the Carry flag and into the lowest bit. The ROR instruction shifts each bit to the right, with the lowest bit copied in the Carry flag and into the highest bit.
User Gluz
by
8.2k points