I need guidance on inlining asm code in my linux C programs. I have some intel-assembler experience and I have made a few stumbling and generally failed efforts to get to grips with AT&T syntax.
However I was trawling through the gcc info pages and found a switch called "-masm=".
I have discovered (excitedly) that gcc will apparently compile a block of asm that is written as regular intel style code. See the screenshot attached to see my simplest-possible test.
My question is this:
Given that A) intel asm is easy, B) AT&T is hard, C) AT&T is gcc and unix standard, D) I have not been able to find any GOOD sources of information (reference or tutorials) on AT&T assembly.
What should I use, intel or AT&T? I do want to conform to industry standards but at the same time AT&T is a nightmare.
I'm willing to put time into learning AT&T, but only if it's going to be time-well spent in the long run, from where I'm standing (angry and frustrated) it just doesn't look that way.
I need the advice of a more experienced unix assembly coder.




Reply With Quote