Inline assembly......

Philippe De Muyter phdm@macqel.be
Tue Jul 4 08:34:00 GMT 2000


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


More information about the Gcc mailing list