9 ms·
Why no one should use the AT&T syntax ever
- tom_mellior 5y agoInteresting discussion of some possible pitfalls where AT&T syntax allows you to shoot yourself in the foot. But to my mind the most important argument is the one mentioned towards the end as a minor one: The official documentation uses Intel syntax. Why would you make your life harder by translating that syntax into a different one?
- rurban 5y agoOnly the official documentation for Intel CPU's. Almost nobody uses Intel CPU's writing asm, most asm writers are on arm or mips, in the embedded world. AT&T is dominant, Intel syntax is for the poor Windows folks.
- CalChris 5y agoI do and my assembler is clang. .intel_syntax
- tom_mellior 5y agoFrom what I remember, ARM docs also put the destination register first, use no sigils for marking registers and immediates, and use a not-entirely-obscure syntax for expressing scaling and such in addressing modes. What aspect of ARM's docs do you consider AT&T-like?
- pjmlp 5y agoI started coding x86 Assembly on the glory days of TASM and MASM and the reality looks quite different on this side. We are so poor with the hegemony of desktop and game consoles CPUs.
- PhantomGremlin 5y agoSomeone probably put a lot of effort into writing that, but I just had to stop reading. It's too hard to separate the content from the snark.
- jeppesen-io 5y agoThat and a 2021 blog post that renders half screen width on my phone
- pjmlp 5y agoPorting a language runtime from Intel syntax into AT&T just not to add an additional dependency to nasm/yasm when GCC was part of the requirements, was a big mistake. In retrospective I should just kept nasm/yasm as dependency. Maybe that could be a curfew project actually, revive the old code just for fun.