Make the 8x32 unsigned multiplication routine C callable.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5079 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -105,6 +105,7 @@ S_OBJS = _cwd.o \
|
||||
cc65_sincos.o \
|
||||
cc65_udiv32by16r16.o \
|
||||
cc65_umul16x16r32.o \
|
||||
cc65_umul16x8r32.o \
|
||||
chdir.o \
|
||||
copydata.o \
|
||||
creat.o \
|
||||
|
||||
27
libsrc/common/cc65_umul16x8r32.s
Normal file
27
libsrc/common/cc65_umul16x8r32.s
Normal file
@@ -0,0 +1,27 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 2011-07-10
|
||||
;
|
||||
; CC65 library: 16x8 => 32 unsigned multiplication
|
||||
;
|
||||
|
||||
.export _cc65_umul16x8r32
|
||||
.import umul8x16r24, popax
|
||||
|
||||
.include "zeropage.inc"
|
||||
|
||||
|
||||
;---------------------------------------------------------------------------
|
||||
; 16x8 => 32 unsigned multiplication routine. We use 8x16 => 24 and clear
|
||||
; the high byte of the result
|
||||
|
||||
.proc _cc65_umul16x8r32
|
||||
|
||||
sta ptr1
|
||||
lda #0
|
||||
sta sreg+1 ; Clear high byte of result
|
||||
jsr popax
|
||||
jmp umul8x16r24
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user