I am having a problem with NASM running on Linux amd64.
Running nasm
on a single instruction mov eax, 0x12345678
produces 6 bytes:
00000000 <.data>:
0: 66 b8 78 56 mov $0x5678,%ax
4: 34 12 xor $0x12,%al
However, using as
on the same instruction in AT&T format mov $0x12345678, %eax
produces the correct result with 5 bytes:
0000000000000000 <.text>:
0: b8 78 56 34 12 mov $0x12345678,%eax
What am I missing with NASM?