This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Inline assembly......


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]