Hi,
could it be that tmr has to be declared volatile?
Worth a try.
Regards
JP
On Thu, 07 Aug 2008 22:25:48 +0200, Arkadi Shishlov <[EMAIL PROTECTED]>
wrote:
> unsigned char start_timer(void)
> {
> unsigned char tmr;
> T0IF = 0;
> // here is a short window of TMR0 overflow
> tmr = TMR0;
> if (tmr != 255)
> T0IF = 0;
> return tmr;
> }
--
NEVER jump into a LOOP!
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user