8 ms·
Gentle Introduction to x86-64 Assembly
- cliff 17y agoWish the examples were using intel syntax.
- swolchok 17y agoI had a reply to this (see below), but reflection revealed that this is just a flame-baiting comment. Intel/AT&T is apparently a long-running flamewar. See e.g. http://www.google.com/url?sa=t&source=web&ct=res&cd=1&url=http%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3DPas0YoxygnkC%26pg%3DPA9%26lpg%3DPA9%26dq%3D%2522ida%2Bpro%2522%2Bintel%2Bsyntax%26source%3Dbl%26ots%3DQmWE1Cboiq%26sig%3D989vPlCpSXF9dYVsRhh7AoKFRps%26hl%3Den%26ei%3DosUjStODFIjOMqKzwa8J%26sa%3DX%26oi%3Dbook_result%26ct%3Dresult%26resnum%3D1&ei=osUjStODFIjOMqKzwa8J&usg=AFQjCNG5ZZ39JZbRt_bfzq9dOMB69z8mXQ http://www.google.com/url?sa=t&source=web&ct=res&... . Originally wrote: Why? The OSS world uses AT&T syntax, because that's what gas uses.
- mahmud 17y agoand anybody who has written non-toy assembly knows GAS is a toy and a royal pain. GAS was designed to be fed the output of GCC, not handwritten. Support for opcodes has been lacking for ages, until NASM came along and put pressure on them. Let's not even compare the macros in intel-type assemblers to GASP, gasp! Inline asm looks hideous with AT&T syntax; they had 20 years to copy Turbo C and they haven't yet. P.S. I hope to god you're not calling your gas sources .S, as gcc will gobble it up or overwrite it if you have .c file with the same file name and you accidently -S.
- jcl 17y agoIt is not flame bait. (BTW, I can't read your link due to Google's copyright restrictions.) gas uses AT&T syntax because it needs a format that applies to multiple architectures. But the Intel format dominates Intel-specific compilers and, I expect, the mindshare of Intel assembly coders. The OSS world is no exception; the open-source Intel nasm and fasm assemblers use Intel format. Intel syntax is so popular, in fact, that gas itself was modified to support it: http://sourceware.org/binutils/docs-2.19/as/i386_002dSyntax.html#i386_002dSyntax http://sourceware.org/binutils/docs-2.19/as/i386_002dSyntax....