GNU C++ Inline Assembler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux