diff --git a/libsrc/runtime/Makefile b/libsrc/runtime/Makefile index fdb7fc650..45a7d1ad6 100644 --- a/libsrc/runtime/Makefile +++ b/libsrc/runtime/Makefile @@ -131,6 +131,9 @@ OBJS = add.o \ mul.o \ mulax3.o \ mulax5.o \ + mulax6.o \ + mulax7.o \ + mulax9.o \ mulax10.o \ ne.o \ neg.o \ diff --git a/libsrc/runtime/mulax6.s b/libsrc/runtime/mulax6.s new file mode 100644 index 000000000..e5e350385 --- /dev/null +++ b/libsrc/runtime/mulax6.s @@ -0,0 +1,30 @@ +; +; Ullrich von Bassewitz, 16.03.2002 +; +; CC65 runtime: Multiply the primary register +; + + .export mulax6 + .importzp ptr1 + +.proc mulax6 + + sta ptr1 + stx ptr1+1 + asl a + rol ptr1+1 + clc + adc ptr1 + pha + txa + adc ptr1+1 + sta ptr1+1 + pla + asl a + rol ptr1+1 + ldx ptr1+1 + rts + +.endproc + + diff --git a/libsrc/runtime/mulax7.s b/libsrc/runtime/mulax7.s new file mode 100644 index 000000000..b7ce28cff --- /dev/null +++ b/libsrc/runtime/mulax7.s @@ -0,0 +1,32 @@ +; +; Ullrich von Bassewitz, 16.03.2002 +; +; CC65 runtime: Multiply the primary register +; + + .export mulax7 + .importzp ptr1, tmp1 + +.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 + +.endproc + + diff --git a/libsrc/runtime/mulax9.s b/libsrc/runtime/mulax9.s new file mode 100644 index 000000000..037f5e76e --- /dev/null +++ b/libsrc/runtime/mulax9.s @@ -0,0 +1,32 @@ +; +; Ullrich von Bassewitz, 16.03.2002 +; +; CC65 runtime: Multiply the primary register +; + + .export mulax9 + .importzp ptr1, tmp1 + +.proc mulax9 + + sta ptr1 + stx ptr1+1 + stx tmp1 + asl a + rol tmp1 ; * 2 + asl a + rol tmp1 ; * 4 + asl a + rol tmp1 ; * 8 + clc + adc ptr1 ; * (8+1) + pha + lda tmp1 + adc ptr1+1 + tax + pla + rts + +.endproc + +