avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Howto I/O in asm instructions?


From: Wouter van Gulik
Subject: Re: [avr-gcc-list] Howto I/O in asm instructions?
Date: Thu, 03 Jul 2008 15:34:30 +0200
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

Ruud Vlaming schreef:
On Thursday 03 July 2008 08:43, Wouter van Gulik wrote:
Ruud Vlaming schreef:
(2) You can use the asm paramter list, like for EEARH ...

You could go for option 2 if you use syntax like this
http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Extended-Asm.html

That is indeed a good solution, which i was not aware of.
Thank you for the tip, i will use this, until i found an awnser
to the question below.

Most beautiful would be if you could somehow define __EECR__
'in the background' once, so it is available in every asm routine you
write, like __SREG__ is defined. Do you know if this is possible at all? It seems avr-libc does not do so by itself, and it is a little less simple
as just defining the values somewhere. It must be (automatically)
architecture dependent and globaly visible.

You could do -D__EECR__="val of EECR" on the command line, but having alot defines and different architecture is not a good idea IMHO.
The __SREG__ defines are build into GCC.

HTH

Wouter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]