the assembly code is
mov eax, 0x3a14a5
jmp eax
GAS produces an opcode of
0xB8, 0xA5, 0x14, 0x3A, 0x00
0xFF, 0xE0
while NASM produces and opcode of
0x66, 0xB8, 0xA5, 0x14, 0x3A, 0x00
0x66, 0xFF, 0xE0
So you see NASM preappends a 0x66 before the code. Within my program (which I won't go into details about), the GAS opcode works correctly, and the NASM code causes a crash indicating that these two opcodes are not equal. Why does NASM preappend the 0x66 and how can I get rid of it?
update: The bits 32
directive worked. Thanks for the quick reply, links, and explanations!