Added special multiplication routines
git-svn-id: svn://svn.cc65.org/cc65/trunk@1012 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -130,6 +130,9 @@ OBJS = add.o \
|
||||
makebool.o \
|
||||
mod.o \
|
||||
mul.o \
|
||||
mulax3.o \
|
||||
mulax5.o \
|
||||
mulax10.o \
|
||||
ne.o \
|
||||
neg.o \
|
||||
or.o \
|
||||
|
||||
32
libsrc/runtime/mulax10.s
Normal file
32
libsrc/runtime/mulax10.s
Normal file
@@ -0,0 +1,32 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 04.10.2001
|
||||
;
|
||||
; CC65 runtime: Multiply the primary register
|
||||
;
|
||||
|
||||
.export mulax10
|
||||
.importzp ptr1
|
||||
|
||||
.proc mulax10
|
||||
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
asl a
|
||||
rol 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
|
||||
|
||||
|
||||
27
libsrc/runtime/mulax3.s
Normal file
27
libsrc/runtime/mulax3.s
Normal file
@@ -0,0 +1,27 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 04.10.2001
|
||||
;
|
||||
; CC65 runtime: Multiply the primary register
|
||||
;
|
||||
|
||||
.export mulax3
|
||||
.importzp ptr1
|
||||
|
||||
.proc mulax3
|
||||
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
asl a
|
||||
rol ptr1+1
|
||||
clc
|
||||
adc ptr1
|
||||
pha
|
||||
txa
|
||||
adc ptr1+1
|
||||
tax
|
||||
pla
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
29
libsrc/runtime/mulax5.s
Normal file
29
libsrc/runtime/mulax5.s
Normal file
@@ -0,0 +1,29 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 04.10.2001
|
||||
;
|
||||
; CC65 runtime: Multiply the primary register
|
||||
;
|
||||
|
||||
.export mulax5
|
||||
.importzp ptr1
|
||||
|
||||
.proc mulax5
|
||||
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
asl a
|
||||
rol ptr1+1
|
||||
asl a
|
||||
rol ptr1+1
|
||||
clc
|
||||
adc ptr1
|
||||
pha
|
||||
txa
|
||||
adc ptr1+1
|
||||
tax
|
||||
pla
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user