Quantcast
Channel: Questions about AT&T x86 Syntax design - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Questions about AT&T x86 Syntax design

$
0
0
  1. Can anyone explain to me why every constant in AT&T syntax has a '$' in front of it?
  2. Why do all registers have a '%'?
  3. Is this just another attempt to get me to do a lot of lame typing?
  4. Also, am I the only one that finds: 16(%esp) really counterintuitive compared to [esp+16]?
  5. I know it compiles to the same thing but why would anyone want to type a lot of '$' and '%'s without a need to? - Why did GNU choose this syntax as the default?
  6. Another thing, why is every instruction in at&t syntax preceded by an: l? - I do know its for the operand sizes, however why not just let the assembler figure that out?(would I ever want to do a movl on operands that are not that size?)
  7. Last thing: why are the mov arguments inverted?

Isn't it more logical that:

eax = 5mov eax, 5

where as at&t is:

mov 5, eax5 = a (? wait what ?)

Note:I'm not trying to troll. I just don't understand the design choices they made and I'm trying to get to know why they did what they did.


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles



Latest Images