X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fruntime%2Fmulax7.s;h=90313180c198edb927b32713c84238dc9634e075;hb=435fd06bc6195eef7d6e389daeca53b1dacae6c3;hp=b7ce28cffacf678658d70719f0ae619c149c41f8;hpb=854f23e945192e7c53b54a9b804e4f60db946e03;p=cc65 diff --git a/libsrc/runtime/mulax7.s b/libsrc/runtime/mulax7.s index b7ce28cff..90313180c 100644 --- a/libsrc/runtime/mulax7.s +++ b/libsrc/runtime/mulax7.s @@ -1,31 +1,32 @@ ; -; 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 7 ; - .export mulax7 - .importzp ptr1, tmp1 + .export mulax7 + .importzp ptr1 -.proc mulax7 +.proc mulax7 - sta ptr1 - stx ptr1+1 - stx tmp1 - asl a - rol tmp1 ; * 2 - asl a - rol tmp1 ; * 4 - asl a - rol tmp1 ; * 8 - sec - sbc ptr1 - pha - lda tmp1 - sbc ptr1+1 ; * (8 - 1) - tax - pla - rts + sta ptr1 + stx ptr1+1 + asl a + rol ptr1+1 ; * 2 + asl a + rol ptr1+1 ; * 4 + asl a + rol ptr1+1 ; * 8 + sec + sbc ptr1 + pha + txa + eor #$ff + adc ptr1+1 ; * (8 - 1) + tax + pla + rts .endproc