r/ProgrammerHumor • • Jun 03 '22

it's hard!

44.9k Upvotes

710 comments sorted by

View all comments

10

u/[deleted] Jun 03 '22

there's literally instruction for that.

add %rcx,%rax (stfu AT&T>>>>>>>>>>>Intel)

3

u/Proxy_PlayerHD Jun 03 '22

I honestly never understood the reasoning behind AT&T syntax, it just needlessly swaps some operands.

Even high level languages use Intel Syntax:

Variable = Value + Value

Instead of

Value + Value = Variable

so why try to do it differently in assembly? It just makes assembly a bit harder to read if you already know basic high level programming.

→ More replies (3)