]> git.sur5r.net Git - cc65/commitdiff
Fixed an error in the division routine: The high byte of the wrong 16 bit
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 11 Jan 2011 17:08:29 +0000 (17:08 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 11 Jan 2011 17:08:29 +0000 (17:08 +0000)
value was checked before entering the faster 16b8 division routine.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4904 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/runtime/udiv.s

index 4dbc477aa698f09f19542f49ff7088254fb8d794..e667af0e29b6c96b351b954093db68e01968140d 100644 (file)
@@ -34,7 +34,7 @@ tosudivax:
 udiv16:        lda     #0
        sta     ptr1+1
        ldy     #16
-        ldx     sreg+1
+        ldx     ptr4+1
         beq     udiv16by8a
 
 L0:    asl     sreg