]> git.sur5r.net Git - cc65/commitdiff
Quick fix for missing _div() adaptation after 95223be.
authorIrgendwerA8 <c.krueger.b@web.de>
Wed, 25 Jul 2018 20:38:29 +0000 (22:38 +0200)
committerOliver Schmidt <ol.sc@web.de>
Thu, 26 Jul 2018 08:44:22 +0000 (10:44 +0200)
libsrc/common/divt.s

index b532f6f95c76ff8e3bc0506441186182b2a8ceed..f1291c86fe7a0b1a045df23bda569b8b1c8fc2ff 100644 (file)
         .importzp       sreg, ptr1, tmp1
 
 _div:   jsr     tosdivax        ; Division-operator does most of the work
-        sta     sreg            ; Quotient is in sreg
-        stx     sreg+1
-        lda     ptr1            ; Unsigned remainder is in ptr1
-        ldx     ptr1+1
+        lda     sreg            ; Unsigned remainder is in sreg
+        ldx     sreg+1
+        ldy     ptr1            ; transfer quotient to sreg
+        sty     sreg
+        ldy     ptr1+1
+        sty     sreg+1
 
 ; Adjust the sign of the remainder.
 ; It must be the same as the sign of the dividend.