Mail Archives: djgpp/2006/02/13/23:56:26
gas (the GNU assembler, into which gcc feeds its output,
whether compiled C or inlined assembly) supports Intel
syntax now, at least on Linux. You invoke it by preceding
your code with the directive:
.intel_syntax
Even better, invoking gcc with a "-masm=intel" switch will
make it generate Intel-style assembly.
-aw
PS. I haven't tested any of the above with DJGPP's gcc,
but the theory is plausible.
On Mon, 23 Jan 2006, Cristiano wrote:
> I need to translate this (it should read the same timer used by Win API
> QueryPerformanceCount):
>
> unsigned short val;
> cli
> xor al,al
> out 43h,al
...
> into AT&T syntax (for DJGPP). I wrote this:
> asm(
> "cli\n\t"
> "xor %al,%al\n\t"
> "out %al,$0x43\n\t"
...
- Raw text -