Re: GCC inline assembly
- From: "Y@xxxxxx" <spamtrap@xxxxxxxxxx>
- Date: Wed, 18 Oct 2006 17:16:21 +0800
spamtrap@xxxxxxxxxx wrote:
Hi all,try this
I know that this may be a really stupid question, but I need some help
with inline assembly on GCC.
I'm trying to make an OS, and i'm having trouble copying register
values to integers with inline assembler
Here is some code:
//begin
int blah;
__asm__ __volatile__ ("mov %%eax,%0": "=g" (blah)::);
__asm__ __volatile__ ("movl %%eax,%0": "=g" (blah));
// end
I think that theoretically, this should move the eax register into
blah, but it doesn't. IO'm really stuck ,and help would be greatly
appreciated.
Thanks,
Mr Linux Guy
Hong
.
- References:
- GCC inline assembly
- From: spamtrap
- GCC inline assembly
- Prev by Date: Re: Sending/returning values to MFC/Microsoft functions
- Next by Date: Re: Sending/returning values to MFC/Microsoft functions
- Previous by thread: Re: GCC inline assembly
- Next by thread: Enter multiple values and display them all at once
- Index(es):
Relevant Pages
|