What is the meaning of XOR in x86 assembly?

前端 未结 11 1883
醉梦人生
醉梦人生 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:44

    If I remember correctly xor ax, ax is a one byte assembly instruction, whilst mov ax, 0 would be at least 3 and would probably take slightly longer to execute. It will certainly take longer to decode than the xor instruction.

提交回复
热议问题