Razvan Turiac <[EMAIL PROTECTED]> wrote: > Attached are a simple C source (I have isolated the > problem), and the generated assembeler file.
> The problem is in function "wait". You should have explained what you think the problem is... But my crystal ball told me you might mean this: .L4: in r24,88-0x20 rjmp .L4 Looks a bit surprising at the first glance, indeed. But only until you see the source code for it: while(!(TIFR & TOV0)); TOV0 is number 0. You told the compiler to read TIFR (which it does), mask all bits out, and then compare it against 0 (the negation). As masking all bits out is guaranteed to generate value 0, the comparision will be always true. I think you meant while(!(TIFR & (1 << TOV0))); -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list