Why XOR a register with itself instead of subtracting
XORing a register with itself is a common assembly language technique that sets the register to zero. This approach is often more efficient than using subtraction instructions because it requires fewer bytes and executes faster on many processors.