Hi,

On 12.08.2010 19:13, István wrote:

if I am not deluded by my memory, r1 permanently holds 0. Actually clr
r1 is redundant.

Not in an ISR. http://www.nongnu.org/avr-libc/user-manual/FAQ.html says under "What registers are used by the C compiler?"

r1 - assumed to be always zero in any C code, may be used to remember something for a while within one piece of assembler code, but must then be cleared after use (clr r1). This includes any use of the [f]mul[s[u]] instructions, which return their result in r1:r0. Interrupt handlers save and clear r1 on entry, and restore r1 on exit (in case it was non-zero).

Regards,
Johannes

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to