X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fnes%2Fclock.s;h=825283c9d7d3b5880cfeaa3172cd42d27a4c7731;hb=4f6110604326357d378f373b917b92c7ad92997e;hp=b36735e854520e902fe00afe89be3916f871a85a;hpb=d53211198b099aa59dcb1853f147c8640bd18ffa;p=cc65 diff --git a/libsrc/nes/clock.s b/libsrc/nes/clock.s index b36735e85..825283c9d 100644 --- a/libsrc/nes/clock.s +++ b/libsrc/nes/clock.s @@ -1,6 +1,11 @@ ; +; clock.s +; ; Written by Groepaz/Hitmen ; Cleanup by Ullrich von Bassewitz +; 2003-05-02, Greg King +; +; #include ; ; clock_t clock (void); ; @@ -16,8 +21,10 @@ ldy #0 ; High word is always zero sty sreg+1 sty sreg - ldx tickcount+1 ; ## Problem: Cannot disable ints here +L1: ldx tickcount+1 lda tickcount + cpx tickcount+1 ; Did tickcount change? + bne L1 ; Yes, re-read it rts .endproc