]> git.sur5r.net Git - cc65/blobdiff - libsrc/runtime/mulax10.s
no TGI_ERR_NO_MEM or TGI_ERR_NO_IOCB anymore: replaced by TGI_ERR_NO_RES
[cc65] / libsrc / runtime / mulax10.s
index 18a17a450fd46aefd63ab3d7d73cc1e65a321108..3fe250c4a59bc307ba0bf3d9b83476fc506eb8d1 100644 (file)
@@ -1,15 +1,16 @@
 ;
-; Ullrich von Bassewitz, 04.10.2001
+; Piotr Fusik, 24.10.2003
+; originally by Ullrich von Bassewitz
 ;
-; CC65 runtime: Multiply the primary register
+; CC65 runtime: Multiply the primary register by 10
 ;
 
-       .export         mulax10
+       .export         mulax10
        .importzp       ptr1
 
 .proc  mulax10
 
-       sta     ptr1
+       sta     ptr1
        stx     ptr1+1
        asl     a
        rol     ptr1+1
        rol     ptr1+1
        clc
        adc     ptr1
-       pha
+       sta     ptr1
        txa
        adc     ptr1+1
-       sta     ptr1+1
-       pla
-       asl     a
-       rol     ptr1+1
-       ldx     ptr1+1
+       asl     ptr1
+       rol     a
+       tax
+       lda     ptr1
        rts
 
 .endproc