Cleared the top bytes for use in arrays.
[fw/sdcc] / device / lib / z80 / mul.s
index fa3fb63ebfcebfa43eb9e0686ef39e767a8daa55..f0817aefdc99d8f3aab992c3d0ba4f1ab2db6e8e 100644 (file)
@@ -32,9 +32,15 @@ __muluchar_rr_s::
         add     hl,sp
 
         ld      e,(hl)
+
         inc     hl
         ld      c,(hl)                
 
+        ;; Clear the top
+        xor     a
+        ld      d,a
+        ld      b,a
+        
         jp      .mulu16
         
 __mulsint_rr_s::