Re:AT&T Syntax versus Intel Syntax
by rwmj on Sunday November 13, 2022 @04:38PM
(#33587616)
It disambiguates labels from registers, assuming of course you allow labels to have register names. eg this is valid:
Stupid perhaps, but valid.
[ Parent
| on HN ]
I wonder if it would have been more ergonomic to have the labels be % prefixed instead of registers.
The above-linked article specifically points out that registers are referenced much more often than labels.
Re:AT&T Syntax versus Intel Syntax
by userbinator on Sunday November 13, 2022 @06:34PM
(#33588526)
Probably an artifact of the original use of the assembler being to process compiler output, and causing variable names to appear.
Re:AT&T Syntax versus Intel Syntax
by professoretc on Monday November 14, 2022 @05:59PM
(#33602600)
Yep, the "nice" thing about AT&T is that, from a parsing perspective, you don't really need to know much about the target architecture to be able to determine what's an instruction vs. a register vs. a label, etc.