3 ms·
Agreed, Intel syntax is much more readable.
by amedvednikov 6y ago
Agreed, Intel syntax is much more readable.
- colejohnson66 6y agoAs an example, when I first looked at AT&T syntax, I saw movl 8(%ebx,%eax,2), %eax What does the 8 mean? How does the stuff in the parenthesis work? Why is there a type suffix? Here’s a general definition of AT&T syntax’s indirect form segment:offset(base,index,scale) But the equivalent in Intel syntax (for the above two is): mov eax, [eax*2+ebx+8] segment:[index*scale+base+offset] Idk, but the Intel syntax is just clearer to me. eax = *(eax*2+ebx+8); Like pseudo code almost. It honestly seems like AT&T syntax was created to facilitate easier parsing by computers, not humans.
- gpderetta 6y agoit is just familiarity. Having learned asm reading GCC output and gdb disassembly, AT&T syntax is obvious to me and it takes me a bit to parse Intel syntax.
- colejohnson66 6y agoThat makes sense, but for me when I started learning, Intel just made more sense: I could see which one was being multiplied by the scale, and what was being added; The indirect addressing syntax reads like algebra. AT&T, OTOH, just felt weird and inconsistent: Why is the offset on the outside of the parenthesis? Why are commas used? The biggest thing for me is that the parameter order doesn’t follow the Intel or AMD opcode manuals; I have to flip the operands in my head to compare them to the opcode manual. I’m not saying people are wrong for using AT&T syntax, or that it’s not intuitive for some. Just that Intel felt more intuitive to me.