Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Sneaky Sram Subterfuge (Somewhat long and complicated)

2004-02-10 by jtvolpe

--- In AVR-Chat@yahoogroups.com, Dave VanHorn <dvanhorn@c...> wrote: 
>  
> > 
> >Is there anywhere in the code where a multibyte pointer variable 
is 
> >updated or used in both interrupt routines as well as 
non-interrupt 
> >routines? 
>  
> Just double-checked, X is reserved for INT0, so no problem there. 
> Z is used in one timer int, but it's pushed and popped. (the right 
way!) 
 
I've come into the conversation late so feel free to wack me on the 
back of the head if this has been asked before.   
 
What compiler are you using ? 
Is the application a mix of 'C' and assembler ? 
 
If you are using GCC, X is used as a general register (r26,r27) by 
the compiler.  A function, 'C' or assembler, called by 'C' is 
allowed to clobber it, but an ISR MUST push/pop X. 
 
Again, sorry if the road is already traveled.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.