Live data from Hacker News

No one should use the AT&T syntax (2021)

outerproduct.net

11–20 of 112 posts

Re: No one should use the AT&T syntax (2021)

#11
> ...you should still clean your CPU at least annually: use soap, warm water, and a soft rag to get the gunk out of the transistors.

I know the author is just making a joke here, and it is funny. Somehow it reminded me of some actual advice I've seen more than once on /r/thinkpad. I am paraphrasing from memory, but I'm sure I have the gist of it:

> When you get a brand new ThinkPad in a factory sealed box, the first thing you must do is completely disassemble it and inspect all the parts. When you reassemble it, repaste the CPU with a quality paste like Arctic MX-4. Now you will have a ThinkPad built to your standards, not Lenovo's.

Re: No one should use the AT&T syntax (2021)

#14
> Putting the destination operand first emphasizes the site of mutation.

This doesn't make any more convincing an argument than the "linguistic" and "consistency" arguments he shot down earlier.

Why should putting the mutated argument first emphasize it any more than putting it second? If you order things the same way every time, people will implicitly know which one is the mutated argument because that's how the language is structured.

There really is no strong benefit to either ordering, other than that [src, dst] is closer to human language (which is a minor benefit at best and not worth fighting over).

Re: No one should use the AT&T syntax (2021)

#15
post #8

Might suggest to change the title to specify this is about the Assembly language.

I'm curious if there's another "AT&T syntax" that would be confused with this? I always assumed was a very well-known assembly style.

AT&T: Local Analog Loopback Test

The modem will perform the local analog loopback test if &T1 is selected. The test can be run only when in an asynchronous operation in non-error-correction mode (normal). To terminate the test in progress, the escape sequence must be entered first (see Section 3.1.1). If S18 is non-zero, the test will terminate automatically after the time specified by S18 and the OK result code will be reported.

https://web.archive.org/web/20151028101531/http://www.zoomte...

Re: No one should use the AT&T syntax (2021)

#17

As someone who has both written and read a lot of assembly in a professional context, my colleagues who are assembly writers very frequently prefer Intel syntax. The ones who are mostly (exclusively) readers seem to generally prefer AT&T. It is pretty undisputed that AT&T is easier for computers to parse, but it's also generally easier for humans to parse when reading it. * The suffixes give you a lot of easy specifi…

> Operand order in AT&T is really dumb

I always found AT&T order much more intuitive to read. The "what am I doing" and then "where will it go" felt natural to me.

But I didn't do much assembler, so my opinion doesn't matter :)

Re: No one should use the AT&T syntax (2021)

#19
Frankly this article's complains read childish to me.

Also, the masm syntax is full of weird-o heuristics to account for the fact that you can omit the size of the operands, and I have been hit by that several times. Yes, I prefer writing in masm, but if I had seen at&t syntax first, I am sure I would be a fan of at&t syntax.

Post reply on HN