From: cuz Date: Wed, 6 Oct 2004 21:42:17 +0000 (+0000) Subject: Replaced putchar by an assembler version X-Git-Tag: V2.12.0~619 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cfe3eda416c35d52efe233e50268bad16197063e;p=cc65 Replaced putchar by an assembler version git-svn-id: svn://svn.cc65.org/cc65/trunk@3216 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/common/.cvsignore b/libsrc/common/.cvsignore index 76d1d0b75..adb367888 100644 --- a/libsrc/common/.cvsignore +++ b/libsrc/common/.cvsignore @@ -24,7 +24,6 @@ locale.s localtime.s mktime.s perror.s -putchar.s puts.s qsort.s realloc.s diff --git a/libsrc/common/Makefile b/libsrc/common/Makefile index 312e6bf6a..9a14ffbed 100644 --- a/libsrc/common/Makefile +++ b/libsrc/common/Makefile @@ -42,7 +42,6 @@ C_OBJS = _afailed.o \ localtime.o \ mktime.o \ perror.o \ - putchar.o \ puts.o \ qsort.o \ realloc.o \ @@ -117,6 +116,7 @@ S_OBJS = _cwd.o \ modload.o \ oserrcheck.o \ printf.o \ + putchar.o \ rand.o \ raise.o \ remove.o \ diff --git a/libsrc/common/putchar.c b/libsrc/common/putchar.c deleted file mode 100644 index a98341a59..000000000 --- a/libsrc/common/putchar.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * putchar.c - * - * Ullrich von Bassewitz, 11.12.1998 - */ - - - -#include -#undef putchar /* This is usually declared as a macro */ - - - -/*****************************************************************************/ -/* Code */ -/*****************************************************************************/ - - - -int __fastcall__ putchar (int c) -{ - return fputc (c, stdout); -} - - - diff --git a/libsrc/common/putchar.s b/libsrc/common/putchar.s new file mode 100644 index 000000000..d77f8d0dd --- /dev/null +++ b/libsrc/common/putchar.s @@ -0,0 +1,20 @@ +; +; Ullrich von Bassewitz, 2004-10-06 +; +; int __fastcall__ putchar (int c); +; + + .export _putchar + .import _stdout + .import _fputc + + +.code + +_putchar: + lda #<_stdout + ldx #>_stdout + jmp _fputc ; __fastcall__ function + + +