fixed the ClockIrqHandler()
[fw/sdcc] / device / lib / ds390 / tinibios.c
index 6be2f3671752a84271140ae3f306deeb756fd603..318ee0276a09fb73d2f38fec5dc34f34e9dfb519 100755 (executable)
@@ -499,21 +499,15 @@ void ClockIrqHandler (void) interrupt 1 {
   _asm
     mov _TL0,_timer0ReloadValue
     mov _TH0,_timer0ReloadValue+1
-    mov a,#0x01
-    add a,_milliSeconds+0
-    mov _milliSeconds+0,a
-    jnc _ClockIrqHandlerDone
     clr a
-    addc a,_milliSeconds+1
-    mov _milliSeconds+1,a
-    jnc _ClockIrqHandlerDone
-    clr a
-    addc a,_milliSeconds+2
-    mov _milliSeconds+2,a
-    jnc _ClockIrqHandlerDone
-    clr a
-    addc a,_milliSeconds+3
-    mov _milliSeconds+3,a
+    inc _milliSeconds+0
+    cjne a,_milliSeconds+0,_ClockIrqHandlerDone
+    inc _milliSeconds+1
+    cjne a,_milliSeconds+1,_ClockIrqHandlerDone
+    inc _milliSeconds+2
+    cjne a,_milliSeconds+2,_ClockIrqHandlerDone
+    inc _milliSeconds+3
+    cjne a,_milliSeconds+3,_ClockIrqHandlerDone
    _ClockIrqHandlerDone:
   _endasm;
 }