Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The argument order is still the same (src,dest, the correct order in my opinion)

OTOH dest, src matches every assignment ever, and is much more regular when extending to multi-parameter mnemonics (e.g. madd).



I’m going to ignore the characters such as % and $, and also the parameter order (sortove)

There’s also the fact that the Intel and AMD x86 manuals list them as

    MNEMONIC dst, src1
GAS does this:

    MNEMONIC src1, dst
Which is fine, but what about 3 and 4 operand instructions? I always have to look that up. 8087 FPU instructions also (in GAS), due to a historical quirk, are in “Intel” form:

    MNEMONIC dst, src
Then there’s that whole indirect syntax of:

    segment:displacement(base,index,scale)
Whereas “Intel” syntax is much clearer:

    segment:[base + index*scale + displacement]
This leads to weird things like:

    [ebx*2+10]  ; I can see what that’s doing
    10(,%ebx,2) ; I need to remember what the order is and convert it in my head
I’m not trying to convince anyone here. If you like “AT&T” syntax, that’s fine with me. I just prefer “Intel” syntax because of these reasons.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: