Not really. The original program used ON INTERRUPT, and there was a possibility that Ticks might be higher than 100 by the time it got around to calculating the time. But when I switched it over to ASM interrupts, it wasn't needed anymore. Just never changed it.Is there a reason you subtract 100 instead of zeroing Ticks?
And for the ms100 routine, I can't figure out what you're trying to do there.
If tmr = 80 then (ms100 - tmr >= 50) will be True when ms100 is between 0-79. So the output will be toggled on every loop. Then for 80-99 the (ms100 < tmr) will never evaluate True since it's always >= 80.
Maybe if you explained what you're trying to do, we can come up with something that'll work.
<br>




Bookmarks