¯K> What could go wrong here? ¯K> The main code is running in an loop polling the STAT,0 bit. ¯K> When it gets set the math is performed and the STAT,0 is cleared ¯K> again, and it goes back in the polling loop. ¯K> The TIMER_STR:2 variable is the count value used in the math. You might want to try double-buffering of the 16bit timer. If your math takes a lot of time, and you're working on the same registers all the time, you may get a new interrupt overwriting you previous values with new ones while still not finished calculation with the previous ones. This could work: ISR routine: ... RETFIE Polling loop pollwaitpollwait optionally-do-math keeponwaiting Math GIE=off Copy TIMER_STR:2 STAT,0=0 ; Do this early so you still register ; interrupts while calc'ing. GIE=on Perform math on TIMER_STR:2 copies The GIE should be switched off so your TIMER_STR:2 is not updated by the ISR while you copy it. rgds, Dag S Any programming language is at its best before it is implemented and used.