]> git.sur5r.net Git - cc65/commitdiff
Add C callable special multiplication routines.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 4 Nov 2009 18:17:00 +0000 (18:17 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 4 Nov 2009 18:17:00 +0000 (18:17 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4440 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/common/Makefile
libsrc/common/cc65_imul16x16r32.s [new file with mode: 0644]
libsrc/common/cc65_umul16x16r32.s [new file with mode: 0644]

index 381742fdf98468cb2d5ad0da3ac80c57666178b7..7b0864280527637ec1f12f32f789ffe7e4bb3beb 100644 (file)
@@ -80,123 +80,125 @@ C_OBJS =  _afailed.o              \
                 timezone.o
 
 # From assembly source-files
-S_OBJS =       _cwd.o          \
-               _environ.o      \
-                _fdesc.o       \
-               _file.o         \
-               _fopen.o        \
-               _heap.o         \
-               _heapadd.o      \
-                _heapblocksize.o\
-                _heapmaxavail.o \
-                _heapmemavail.o \
-               _oserror.o      \
-               _printf.o       \
-                _seterrno.o     \
-               _swap.o         \
-               _sys.o          \
-               abs.o           \
-               atexit.o        \
-               atoi.o          \
-               calloc.o        \
-                cc65_sincos.o   \
-                chdir.o         \
-               copydata.o      \
-                creat.o         \
-                ctime.o         \
-                divt.o          \
-               errno.o         \
-               fclose.o        \
-               fmisc.o         \
-               fopen.o         \
-               fprintf.o       \
-               fread.o         \
-               free.o          \
-                fscanf.o        \
-               fwrite.o        \
-               getcpu.o        \
-                getcwd.o        \
-               getenv.o        \
-               isalnum.o       \
-               isalpha.o       \
-               isblank.o       \
-               iscntrl.o       \
-               isdigit.o       \
-               isgraph.o       \
-               islower.o       \
-               isprint.o       \
-               ispunct.o       \
-               isspace.o       \
-               isupper.o       \
-               isxdigit.o      \
-               itoa.o          \
-               labs.o          \
-               longjmp.o       \
-               ltoa.o          \
-               malloc.o        \
-               maperrno.o      \
-               memchr.o        \
-               memcmp.o        \
-               memcpy.o        \
-                memmove.o       \
-               memset.o        \
-               mkdir.o         \
-               modfree.o       \
-               modload.o       \
-                oserrcheck.o    \
-               printf.o        \
-               putchar.o       \
-               putenv.o        \
-               rand.o          \
-                raise.o         \
-                remove.o        \
-                rename.o        \
-               rmdir.o         \
-                scanf.o         \
-               searchenv.o     \
-               setjmp.o        \
-                signal.o        \
-                sigtable.o      \
-                snprintf.o      \
-               sprintf.o       \
-               sscanf.o        \
-               strcat.o        \
-               strchr.o        \
-               strcmp.o        \
-               strcoll.o       \
-               strcpy.o        \
-               strcspn.o       \
-               strdup.o        \
-               strerror.o      \
-               stricmp.o       \
-               strlen.o        \
-               strlower.o      \
-               strncat.o       \
-               strncmp.o       \
-               strncpy.o       \
-               strnicmp.o      \
-                stroserr.o      \
-               strpbrk.o       \
-               strrchr.o       \
-               strspn.o        \
-               strstr.o        \
-                strtoimax.o     \
-                strtoumax.o     \
-               strupper.o      \
-                time.o          \
-               tolower.o       \
-               toupper.o       \
-                uname.o         \
-                ungetc.o        \
-                unlink.o        \
-                utscopy.o       \
-               vfprintf.o      \
-                vfscanf.o       \
-               vprintf.o       \
-                vscanf.o        \
-                vsnprintf.o     \
-               vsprintf.o      \
-                vsscanf.o       \
+S_OBJS =       _cwd.o                  \
+               _environ.o              \
+                _fdesc.o               \
+               _file.o                 \
+               _fopen.o                \
+               _heap.o                 \
+               _heapadd.o              \
+                _heapblocksize.o        \
+                _heapmaxavail.o         \
+                _heapmemavail.o         \
+               _oserror.o              \
+               _printf.o               \
+                _seterrno.o             \
+               _swap.o                 \
+               _sys.o                  \
+               abs.o                   \
+               atexit.o                \
+               atoi.o                  \
+               calloc.o                \
+                cc65_imul16x16r32.o     \
+                cc65_sincos.o           \
+                cc65_umul16x16r32.o     \
+                chdir.o                 \
+               copydata.o              \
+                creat.o                 \
+                ctime.o                 \
+                divt.o                  \
+               errno.o                 \
+               fclose.o                \
+               fmisc.o                 \
+               fopen.o                 \
+               fprintf.o               \
+               fread.o                 \
+               free.o                  \
+                fscanf.o                \
+               fwrite.o                \
+               getcpu.o                \
+                getcwd.o                \
+               getenv.o                \
+               isalnum.o               \
+               isalpha.o               \
+               isblank.o               \
+               iscntrl.o               \
+               isdigit.o               \
+               isgraph.o               \
+               islower.o               \
+               isprint.o               \
+               ispunct.o               \
+               isspace.o               \
+               isupper.o               \
+               isxdigit.o              \
+               itoa.o                  \
+               labs.o                  \
+               longjmp.o               \
+               ltoa.o                  \
+               malloc.o                \
+               maperrno.o              \
+               memchr.o                \
+               memcmp.o                \
+               memcpy.o                \
+                memmove.o               \
+               memset.o                \
+               mkdir.o                 \
+               modfree.o               \
+               modload.o               \
+                oserrcheck.o            \
+               printf.o                \
+               putchar.o               \
+               putenv.o                \
+               rand.o                  \
+                raise.o                 \
+                remove.o                \
+                rename.o                \
+               rmdir.o                 \
+                scanf.o                 \
+               searchenv.o             \
+               setjmp.o                \
+                signal.o                \
+                sigtable.o              \
+                snprintf.o              \
+               sprintf.o               \
+               sscanf.o                \
+               strcat.o                \
+               strchr.o                \
+               strcmp.o                \
+               strcoll.o               \
+               strcpy.o                \
+               strcspn.o               \
+               strdup.o                \
+               strerror.o              \
+               stricmp.o               \
+               strlen.o                \
+               strlower.o              \
+               strncat.o               \
+               strncmp.o               \
+               strncpy.o               \
+               strnicmp.o              \
+                stroserr.o              \
+               strpbrk.o               \
+               strrchr.o               \
+               strspn.o                \
+               strstr.o                \
+                strtoimax.o             \
+                strtoumax.o             \
+               strupper.o              \
+                time.o                  \
+               tolower.o               \
+               toupper.o               \
+                uname.o                 \
+                ungetc.o                \
+                unlink.o                \
+                utscopy.o               \
+               vfprintf.o              \
+                vfscanf.o               \
+               vprintf.o               \
+                vscanf.o                \
+                vsnprintf.o             \
+               vsprintf.o              \
+                vsscanf.o               \
                zerobss.o
 
 
diff --git a/libsrc/common/cc65_imul16x16r32.s b/libsrc/common/cc65_imul16x16r32.s
new file mode 100644 (file)
index 0000000..331e218
--- /dev/null
@@ -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
+
diff --git a/libsrc/common/cc65_umul16x16r32.s b/libsrc/common/cc65_umul16x16r32.s
new file mode 100644 (file)
index 0000000..84c7153
--- /dev/null
@@ -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
+
+