Hacker News new | past | comments | ask | show | jobs | submit login

The M68k has two different syntaxes too. The argument order is still the same (src,dest, the correct order in my opinion), but other things are different, with the main difference being indirect addressing which is (a0) in Motorola syntax, while it's a0@ in AT&T syntax.

So while the changes might not be as huge, it's definitely not just Intel.




> 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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: