public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Robin-Vossen <robin-vossen@hotmail.com>
To: gcc-help@gcc.gnu.org
Subject: GNU C++ Inline Assembler
Date: Sun, 10 Aug 2008 21:39:00 -0000	[thread overview]
Message-ID: <18912389.post@talk.nabble.com> (raw)


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.

             reply	other threads:[~2008-08-10 11:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-10 21:39 Robin-Vossen [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18912389.post@talk.nabble.com \
    --to=robin-vossen@hotmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).