- Can anyone explain to me why every constant in AT&T syntax has a '$' in front of it?
- Why do all registers have a '%'?
- Is this just another attempt to get me to do a lot of lame typing?
- Also, am I the only one that finds:
16(%esp)
really counterintuitive compared to[esp+16]
? - 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?
- 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?)
- 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.