+ ; get timer value
+ in tmp1,TCNT1L
+ in tmp2,TCNT1H
+
+ ; check for initial or running state
+ cpi state,0
+ brne INT0_RUN
+
+ ; configure interrupt for running state
+ rcall INT0_IR_CONF_RUN
+ ldi state,1
+
+ ; reset timer and start ovf interrupt
+ ldi tmp1,0
+ out TCNT1H,tmp1
+ out TCNT1L,tmp1
+ rcall TIMER1_INT_ENABLE
+
+ rjmp EXIT_IR
+
+INT0_RUN:
+
+ ; write timer value into sram
+ st Z+,tmp2
+ st Z+,tmp1
+
+ ; inc counter
+ add count,one