Live data from Hacker News

AT&T Syntax versus Intel Syntax (2001)

cs.mcgill.ca

31–40 of 112 posts

Re: AT&T Syntax versus Intel Syntax (2001)

#31
post #12

Earlier quoted context omitted.

In mathematics variable = value , variable receives value, ergo op dest src . That is logic.

That is just an arbitrary notation, nothing to do with logic. In English at least, "add 4 to x" is more natural than "add to x 4". Ergo op src dest

But English "add 4 to x" tells you nothing about where to store the result. : - )

"Add 4 to x and store result in x" vs "Let x be x + 4"?

Re: AT&T Syntax versus Intel Syntax (2001)

#32
post #27

I initially learned the Intel syntax, and preferred it for awhile. But the more I work with non-x86 CPUs, the more I prefer AT&T just because it feels less different than everything else.

Much agreed. Intel syntax just seems somewhat alien.

But all the Intel instruction documentation unsurprisingly uses the Intel syntax!

Re: AT&T Syntax versus Intel Syntax (2001)

#33
post #27

I initially learned the Intel syntax, and preferred it for awhile. But the more I work with non-x86 CPUs, the more I prefer AT&T just because it feels less different than everything else.

Much agreed. Intel syntax just seems somewhat alien.

That's interesting. My entire world revolves around x86 and ARM, so "Intel" syntax (which to me mostly means op dest, src) is what seems normal to me.

Re: AT&T Syntax versus Intel Syntax (2001)

#34
post #31

Earlier quoted context omitted.

That is just an arbitrary notation, nothing to do with logic. In English at least, "add 4 to x" is more natural than "add to x 4". Ergo op src dest

But English "add 4 to x" tells you nothing about where to store the result. : - ) "Add 4 to x and store result in x" vs "Let x be x + 4"?

Without any other context, you generally assume that the target is an accumulator.

So "add 4 coins to that bucket", generally means at the end of that operation the bucket contains at least four coins plus any coins that were already in the bucket.

Re: AT&T Syntax versus Intel Syntax (2001)

#35
post #12

Earlier quoted context omitted.

op src dest is the logical order, the rest of the syntax I don’t care about much.

In mathematics variable = value , variable receives value, ergo op dest src . That is logic.

...math has no such order. Half the point of algebra is that the two sides of the equation are semantically equivalent and can be swapped at will.

Re: AT&T Syntax versus Intel Syntax (2001)

#36
post #12

Earlier quoted context omitted.

op src dest is the logical order, the rest of the syntax I don’t care about much.

In mathematics variable = value , variable receives value, ergo op dest src . That is logic.

Postfix , infix, prefix, crucifix.

Re: AT&T Syntax versus Intel Syntax (2001)

#37
Interesting bit of trivia, Prof. Ratzer, the author of this piece, was the first graduate student in computing at McGill University [1] and one of the founding members of the School of Computer Science [2], which just recently celebrated its 50th anniversary. [3]

[1]: https://en.wikipedia.org/wiki/McGill_University_School_of_Co...

[2]: https://www.cs.mcgill.ca/~ratzer/backup/welcome.html

[3]: https://mcgill.imodules.com/controls/email_marketing/view_in...

Re: AT&T Syntax versus Intel Syntax (2001)

#38
post #17

Earlier quoted context omitted.

Contemplate the AT&T vs Intel syntax for x86 addressing modes and say that again.

X86 addressing modes are an atrocity: https://stackoverflow.com/questions/63571979/clarifying-thre...

They are an atrocity in AT&T syntax. They are perfectly readable in Intel format. For example:

https://blog.yossarian.net/2020/06/13/How-x86_64-addresses-m...

Re: AT&T Syntax versus Intel Syntax (2001)

#39
post #15
post #12

Earlier quoted context omitted.

In mathematics variable = value , variable receives value, ergo op dest src . That is logic.

Indeed. Besides, “let there be light” is clearly destination-first, so this matter was already resolved by Genesis 1:3.

Which direction was the Hebrew text written in?

Re: AT&T Syntax versus Intel Syntax (2001)

#40
post #27

Earlier quoted context omitted.

Much agreed. Intel syntax just seems somewhat alien.

That's interesting. My entire world revolves around x86 and ARM, so "Intel" syntax (which to me mostly means op dest, src) is what seems normal to me.

Order of dst and src i have no strong feelings about, it's all the rest that i find weird about intel syntax.
Post reply on HN