Answer the question
In order to leave comments, you need to log in
How to write a command in Intel syntax?
How to write x86 command:
With AT&T
movb $4,%ah
on Intel syntax The
trick is that with AT&T the command takes only 2 bytes
A20000000000
And with Intel
B00400000000
Disassembly gave this result:
mov ds:0x0,al
Can someone explain to me what this meansds:0x0
Answer the question
In order to leave comments, you need to log in
.text
.att_syntax
foo:
movb $4, %al
.intel_syntax
mov %al, 4
$ gcc -c att-intel.S
$ objdump -d att-intel.o
att-intel.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <foo>:
0: b0 04 mov $0x4,%al
2: b0 04 mov $0x4,%al
Disassembly gave the following result:
mov ds:0x0,al
Can someone explain to me what it means ds: 0x0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question