I am trying to understand the differences between Intel syntax and AT & T syntax (I use GNU as).
I have two files, intel.s:
.intel_syntax noprefix
val:
mov eax, val
and atandt.s:
val:
mov $val, %eax
I am trying to convert the AT & T version to the Intel version. But I have different results:
$ objdump -d intel.o
intel.o: file format elf32-i386
Disassembly of section .text:
00000000 <val>:
0: a1 00 00 00 00 mov 0x0,%eax
and
$ objdump -d atandt.o
atandt.o: file format elf32-i386
Disassembly of section .text:
00000000 <val>:
0: b8 00 00 00 00 mov $0x0,%eax
Why are they different?
source
share