What is the meaning of XOR in x86 assembly?

前端 未结 11 1922
醉梦人生
醉梦人生 2020-12-13 08:50

I\'m getting into assembly and I keep running into xor, for example:

xor     ax, ax

Does it just clear the register\'s value?

11条回答
  •  孤街浪徒
    2020-12-13 09:29

    xor ax,ax is used to set ax to 0.

    Reason: typically xor instruction on any processor takes less bytes in assembling, than using movl 0,%ax

提交回复
热议问题