Hacker News new | ask | show | jobs
by WalterGR 39 days ago
Here’s an archive.org mirror of the broken “Why no one should use the AT&T syntax ever, for any reason, under any circumstances” link: https://web.archive.org/web/20251128060318/https://outerprod...
2 comments

If "historical" UNIX is one's focus, then need to be able to read (and edit) ATT assembly

The author claims Intel syntax is ubiquitous. True. But so is "historical" UNIX

Long rants about asm syntax are old, tired tropes. Perhaps they are entertaining to beginning programmers but today such rants achieve nothing except to put the sanity (and hence the judgment) of their authors into question

The existing ATT syntax assembler in "historical" UNIX source trees will not be translated it into Intel syntax

By all means, _use_ Intel syntax^1

But if "historical" UNIX is one's focus, comfort with _reading and editing_ ATT syntax, despite all of its alleged flaws, will continue to be useful

1. The author's own footnote:

"You can tell GCC to use Intel syntax for its inline assembly with -masm=intel. This doesn't work with Clang; complain to them. (Or just don't use inline assembly; it's usually not a great idea anyway.) For objdump, pass -Mintel. And for gdb, put set disassembly-flavor intel in your ~/.gdbinit."

Perhaps some HN readers might like this:

https://raw.githubusercontent.com/pirate/assembly-repl/main/...

https://github.com/pirate/assembly-repl

(requires clang)

Literally came here to post this, thank you