public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GNU C++ Inline Assembler
@ 2008-08-10 21:39 Robin-Vossen
  2008-08-11  6:37 ` Bob Plantz
  0 siblings, 1 reply; 10+ messages in thread
From: Robin-Vossen @ 2008-08-10 21:39 UTC (permalink / raw)
  To: gcc-help


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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-08-13  8:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-10 21:39 GNU C++ Inline Assembler Robin-Vossen
2008-08-11  6:37 ` Bob Plantz
2008-08-11 16:35   ` Robin-Vossen
2008-08-11 16:59     ` David Daney
2008-08-11 21:24     ` Andrew Haley
2008-08-12  1:08       ` Bob Plantz
2008-08-12  2:29         ` Brian Dessent
2008-08-12  8:56           ` Bob Plantz
2008-08-13 17:27             ` Robin-Vossen
2008-08-12 15:26           ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).