September 14, 2017

Difference between AT&T and intel in assembly code

AT&TIntel
Register%RAXRAX
Operand locationMOV source, destinationMOV destination, source
Operand sizeb(byte), w(word), l(long)BYTE ptr, WORD ptr, DWORD ptr(long)
Constant$33
Address$variablevariable
Valuevariable[variable]
Indirect reference(%RAX)
16(%RAX)
[RAX]
[RAX+16]
Instruction1. LJMP/LCALL $section, $offset
2. lret $stack-adjust
3. cbtw
4. cwtl
5. cwtd
6. cltd
1. JMP/CALL far section:offset
2. ret far stack-adjust
3. cbw
4. cwtd
5. cwd
6. cdq