This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Inline assembly......
- To: martin at loewis dot home dot cs dot tu-berlin dot de (Martin v. Loewis)
- Subject: Re: Inline assembly......
- From: "Philippe De Muyter" <phdm at macqel dot be>
- Date: Tue, 4 Jul 2000 17:33:48 +0200 (CEST)
- Cc: Mark_Farr/ARC at arccores dot com, gcc at gcc dot gnu dot org
Martin v. Loewis wrote :
> > Is it possible to read a value from a register and use the result in
> > the program?
>
> Sure is.
>
> > I have read through the docs but cant see a mention of such a
> > feature.
>
> Have a look at (gcc)Extended Asm.
I'd rather think he simply meant (if 0xfedcba98 is the address of the register):
#define THE_REGISTER (*((volatile unsigned char *)0xfedcba98))
value = THE_REGISTER;
>
> Regards,
> Martin
>
Philippe