4 ms·
The examples seem odd to me: the argument order is reversed from every Intel disassembly (or assembler) I've ever used. Addi edi, 43 is the normal way to say "
by JoeAltmaier 10y ago
The examples seem odd to me: the argument order is reversed from every Intel disassembly (or assembler) I've ever used. Addi edi, 43 is the normal way to say "Add 43 to edi". The destination register is normally first; the source register 2nd in the disassembly, right?
- ycmbntrthrwaway 10y agogdb uses AT&T syntax by default. [0] [0] https://en.wikipedia.org/wiki/X86_assembly_language#Syntax https://en.wikipedia.org/wiki/X86_assembly_language#Syntax
- sigjuice 10y agoThis article uses lldb, and not gdb. Both default to AT&T syntax, I guess.
- wolfgke 10y agoIn the examples given in the article it is written addl $42, %edi which is correct in AT&T syntax. In Intel syntax it would be add edi, 42
- raimue 10y agoThe examples in the article are in AT&T syntax, you seem to be used to Intel syntax. Just keep on reading, the article will discuss the differences between AT&T and Intel syntax.