]> git.sur5r.net Git - cc65/commitdiff
Fixed a bug: Divisions with a divisor > 0xFFFFFF did not work because the
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 5 Jul 2005 21:01:34 +0000 (21:01 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 5 Jul 2005 21:01:34 +0000 (21:01 +0000)
high byte of the divisor was overwritten instead of the high byte of the
result.

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

libsrc/runtime/ludiv.s

index 1d8dc730ae51808e773ffc49daad1d7fbe17cfcb..8b9ea98e9e3ba7d909d09be4c332752137f548b6 100644 (file)
@@ -72,7 +72,7 @@ L0:   asl     ptr1
 
 ; Overflow, do the subtraction again, this time store the result
 
-       sta     ptr4+1          ; We have the high byte already
+        sta            tmp4            ; We have the high byte already
        pla
        sbc     ptr3            ; byte 0
        pha