Running the code below in VS2019, I was surprised with the fact that the register EAX is not zeroed with the instruction xor eax, eax.
_text SEGMENT
.486
.model flat,stdcall
.stack 4096
.code
main PROC
xor eax, eax
ret
main ENDP
_text ENDS
END
P.S.: I was expecting the EAX register to be zero after the instruction xor eax, eax. Debugging the code with a break point in the ret instruction I can see in the Registers window that only AX is zeroed. Nothing happens to the bits 16-31 in EAX. In x64 the instruction xor eax, eax executes correctly, zeroing the entire RAX register as expected.