From cd4a9e3fb0469c31462e048e27f9c57c751e998d Mon Sep 17 00:00:00 2001 From: cuz Date: Mon, 5 May 2003 08:20:07 +0000 Subject: [PATCH] Fixed a problem with clock() (Greg King) git-svn-id: svn://svn.cc65.org/cc65/trunk@2147 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/nes/clock.s | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 2.39.5