Thanks for all usefull answers!
This one: "register char foo asm("r2");" is exactly what I searched
for. It works fine!
Best regards Laurens
--- In AVR-Chat@yahoogroups.com, "Don Kinzer" <dkinzer@...> wrote:
>
> --- In AVR-Chat@yahoogroups.com, "organix80" <organix@> wrote:
> > Is it possible to claim registers that not should be
> > used by the C compiler?
> I believe that this will work:
>
> register char foo asm("r2");
>
> The avr-libc documentation indicates that this usage should be
> restricted to registers r2 through r15. You should minimize the
> dedication of registers like this, however, since it infringes on the
> e compiler's ablility to optimize your code.
>
> Don Kinzer
> ZBasic Microcontrollers
> http://www.zbasic.net
>Message
Re: Claiming global registers in WinAVR / assembly
2007-07-18 by organix80
Attachments
- No local attachments were found for this message.