Hacker News new | ask | show | jobs
by pjmlp 3721 days ago
Intel's syntax is most common, not the AT&T one.

You only see it everywhere nowadays thanks to the rise of GNU/Linux and other open source UNIXes.

If you translate mov into =, the syntax makes much more sense than AT&T.

I mean

mov dst, src

is similar to

dst = src

2 comments

> Intel's syntax is most common, not the AT&T one.

I'd be a little bit more careful with such a statement: Under Windows (and formerly DOS) Intel syntax is the common one, while under GNU/Linux and OSX the AT&T one is used.

> If you translate mov into =, the syntax makes much more sense than AT&T.

Though I prefer the Intel syntax, I'd be careful with "makes sense" here: According to http://stackoverflow.com/a/4119217/497193 people who grew up with MIPS seem to prefer the AT&T syntax since it is much more similar to MIPS assembler.

Apparently you missed my second paragraph.

Only UNIX based OSes follow AT&T, for obvious reasons.

It has nothing to do with the operating system. AT & T syntax follows the same style as pretty much any other computer and processor in existence. (Exceptions exist, but they are exotic oddities.)
> Intel's syntax is most common, not the AT&T one.

No, intel is an exception, not the norm. Amstrad, Atari, Commodore 64, Amiga, Sun (both Motorola and (Ultra)SPARC) all use "move src, dst", $ or 0x... only intel diverges from the norm.