]> git.sur5r.net Git - cc65/blobdiff - libsrc/runtime/mulax9.s
no TGI_ERR_NO_MEM or TGI_ERR_NO_IOCB anymore: replaced by TGI_ERR_NO_RES
[cc65] / libsrc / runtime / mulax9.s
index 037f5e76e3c9ad6b32c1fecb4845d56fe581bd13..67a07b4d63bfb055493dfd3c86bb7b828887bbfb 100644 (file)
@@ -1,27 +1,27 @@
 ;
-; Ullrich von Bassewitz, 16.03.2002
+; Piotr Fusik, 24.10.2003
+; originally by Ullrich von Bassewitz
 ;
-; CC65 runtime: Multiply the primary register
+; CC65 runtime: Multiply the primary register by 9
 ;
 
-       .export         mulax9
-       .importzp       ptr1, tmp1
+       .export         mulax9
+       .importzp       ptr1
 
 .proc  mulax9
 
-       sta     ptr1
-       stx     ptr1+1
-       stx     tmp1
-       asl     a
-       rol     tmp1                    ; * 2
-       asl     a
-       rol     tmp1                    ; * 4
-       asl     a
-       rol     tmp1                    ; * 8
+       sta     ptr1
+       stx     ptr1+1
+       asl     a
+       rol     ptr1+1                  ; * 2
+       asl     a
+       rol     ptr1+1                  ; * 4
+       asl     a
+       rol     ptr1+1                  ; * 8
        clc
-       adc     ptr1                    ; * (8+1)
+       adc     ptr1                    ; * (8+1)
        pha
-       lda     tmp1
+       txa
        adc     ptr1+1
        tax
        pla