Hi Jeff,
that was just playing to see that I am altering more than I am actually putting (explicitly) , so the reason for the size specifier to be there.
While the instructions above produce the same opcode with specifier on the right or the left, Frank Kotler was pointing at this
movzx eax, byte [ebx] where the size specifier needs to be at the source operand.
This with
mov eax, byte [ebx]
gives an error as the size comes from the destination register.
This:
movzx byte eax, [ebx]
gives a warning for byte and error for missing size specifier (on the source op)
this works
mov eax, [ebx]
Any way, as of my minimal knowledge, if the destination is a register,
you are using the register size to tell how much you are storing. That
works for mov while is the opposite for movzx where there is a need to
put the size specifier before the source operand, where in mov is an
error.
I will try to figure myself what is that requires movzx a size specifier on the source operand.
Thanks
Fabio