GNU C++ Inline Assembler

Robin-Vossen robin-vossen@hotmail.com
Sun Aug 10 21:39:00 GMT 2008


Hello, 
is there a known way to use MSVC++ Style Inline Assembler in GCC code?
The main diffrence is that MSVC uses Intel Syntax. And GCC uses AT&T. I dont
like AT&T...
I wonder if there is a library or a function in GCC itself to compile the
following code segment: (MSVC can do this..)

int main ()
{
int INTEGER;
char CHARACTER;
INTEGER = 1;
__asm{ 
            mov eax, [INTEGER]
            inc eax, esp
            mov [INTEGER], eax
            mov [CHARACTER], ah
         }
return 0;
}

as you see I can use Pointers to variables. and use Intel Syntax.

Can this be done?
At this moment I run a Windows Version of GCC mainly.
And I hate MSVC, takes long to load and stuff. So I HOPE that I can do this
in GCC.
So I can remove MSVC soon.

Thanks,
Cheers,
Robin
-- 
View this message in context: http://www.nabble.com/GNU-C%2B%2B-Inline-Assembler-tp18912389p18912389.html
Sent from the gcc - Help mailing list archive at Nabble.com.



More information about the Gcc-help mailing list