1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-12 02:30:44 +00:00

Add C callable special multiplication routines.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4440 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2009-11-04 18:17:00 +00:00
parent 56e035635b
commit 851926b301
3 changed files with 167 additions and 117 deletions

View File

@ -99,7 +99,9 @@ S_OBJS = _cwd.o \
atexit.o \
atoi.o \
calloc.o \
cc65_imul16x16r32.o \
cc65_sincos.o \
cc65_umul16x16r32.o \
chdir.o \
copydata.o \
creat.o \

View File

@ -0,0 +1,24 @@
;
; Ullrich von Bassewitz, 2010-11-03
;
; CC65 library: 16x16 => 32 signed multiplication
;
.export _cc65_imul16x16r32
.import imul16x16r32, popax
.importzp ptr1
;---------------------------------------------------------------------------
; 16x16 => 32 signed multiplication routine.
.proc _cc65_imul16x16r32
sta ptr1
stx ptr1+1
jsr popax
jmp imul16x16r32
.endproc

View File

@ -0,0 +1,24 @@
;
; Ullrich von Bassewitz, 2010-11-03
;
; CC65 library: 16x16 => 32 unsigned multiplication
;
.export _cc65_umul16x16r32
.import umul16x16r32, popax
.importzp ptr1
;---------------------------------------------------------------------------
; 16x16 => 32 unsigned multiplication routine.
.proc _cc65_umul16x16r32
sta ptr1
stx ptr1+1
jsr popax
jmp umul16x16r32
.endproc