Difference between SHL and SAL in 80x86

前端 未结 7 1554
有刺的猬
有刺的猬 2020-12-17 08:56

I have learned how to work with 80x86 assembler, so in bit-wise shift operation, I faced a problem with SAL and SHL usage. I means the difference between lines of code as fo

7条回答
  •  遥遥无期
    2020-12-17 09:06

    they work the same, since an arithmetic shift is the same as a bitwise shift when it's to the left (increasing). sar, on the other hand, will be different from shr if the sign bit is set.

提交回复
热议问题