From ef9edbe3570d7e86770b3167c4dae3bf25d55b7d Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 15 Nov 2002 18:21:32 +0000 Subject: [PATCH] Rewrite cbm_write() in assembler git-svn-id: svn://svn.cc65.org/cc65/trunk@1524 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/cbm/.cvsignore | 1 - libsrc/cbm/Makefile | 4 +- libsrc/cbm/cbm_write.c | 31 -------------- libsrc/cbm/cbm_write.s | 92 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 34 deletions(-) delete mode 100644 libsrc/cbm/cbm_write.c create mode 100644 libsrc/cbm/cbm_write.s diff --git a/libsrc/cbm/.cvsignore b/libsrc/cbm/.cvsignore index 47de2da60..4b273aef6 100644 --- a/libsrc/cbm/.cvsignore +++ b/libsrc/cbm/.cvsignore @@ -1,3 +1,2 @@ cbm_load.s cbm_save.s -cbm_write.s diff --git a/libsrc/cbm/Makefile b/libsrc/cbm/Makefile index b224d139b..a95d33219 100644 --- a/libsrc/cbm/Makefile +++ b/libsrc/cbm/Makefile @@ -12,8 +12,7 @@ @$(AS) -g -o $@ $(AFLAGS) $< C_OBJS = cbm_load.o \ - cbm_save.o \ - cbm_write.o + cbm_save.o S_OBJS = c_acptr.o \ c_basin.o \ @@ -38,6 +37,7 @@ S_OBJS = c_acptr.o \ cbm_close.o \ cbm_open.o \ cbm_read.o \ + cbm_write.o \ cclear.o \ chline.o \ clock.o \ diff --git a/libsrc/cbm/cbm_write.c b/libsrc/cbm/cbm_write.c deleted file mode 100644 index 84433623f..000000000 --- a/libsrc/cbm/cbm_write.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Marc 'BlackJack' Rintsch, 25.03.2001 - * - * int cbm_write(unsigned char lfn, void* buffer, unsigned int size); - */ - -#include -#include - -int cbm_write(unsigned char lfn, void* buffer, unsigned int size) { - - static unsigned int byteswritten; - - /* if we can't change to the outputchannel #lfn then return an error */ - if (_oserror = cbm_k_ckout(lfn)) return -1; - - byteswritten = 0; - - while (byteswritten