0

From Computer Systems: a Programmer's Perspective, about assembly languages:

We see that the Intel and ATT formats differ in the following ways:

  • The Intel code omits the size designation suffixes. We see instruction push and mov instead of pushq and movq.
  • The Intel code omits the ‘%’ character in front of register names, using rbx instead of %rbx.
  • The Intel code has a different way of describing locations in memory—for example, QWORD PTR [rbx] rather than (%rbx).
  • Instructions with multiple operands list them in the reverse order. This can be very confusing when switching between the two formats.

There is close correspondence between assembly languages and machine languages (i.e. ISA).

Do the above differences between ATT and Intel formats of assembly languages come from some differences between their underlying machine languages? Or do the differences between ATT and Intel formats of assembly languages only exist at the level of assembly languages, i.e. is it normal that both formats may be based on the same machine languages?

Thanks.

2 Answers 2

7

Considering that both AT&T syntax and Intel syntax are used for x86 assemblers, the difference cannot possibly be related to the underlying machine language, because there is only one underlying machine language.

1

The AT&T syntax was initially developed for machines with different architectures (PDP-11, probably later 3B2) in the history of the UNIX operating system.

So it might be reasonable to assume that the original design decisions for this syntax were driven by different hardware architecture properties, but of course the original developers would be the right people to ask about their original reason.

There has been a question on SO: https://stackoverflow.com/questions/4193827/questions-about-att-x86-syntax-design/ which goes into some detail but is also only speculative as what the actual reasons were.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.