From 31e4d80ac83272351c9a1b5d8149a188bb46330b Mon Sep 17 00:00:00 2001 From: izydorst Date: Mon, 23 Dec 2002 20:44:17 +0000 Subject: [PATCH] more GEOS Kernal replacements for common/ and runtime/ routines git-svn-id: svn://svn.cc65.org/cc65/trunk@1833 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/geos/Makefile | 2 +- libsrc/geos/common/Makefile | 2 +- libsrc/geos/common/zerobss.s | 27 +++++++++++++++++++++++++++ libsrc/geos/runtime/Makefile | 21 +++++++++++++++++++++ libsrc/geos/runtime/call.s | 12 ++++++++++++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 libsrc/geos/common/zerobss.s create mode 100644 libsrc/geos/runtime/Makefile create mode 100644 libsrc/geos/runtime/call.s diff --git a/libsrc/geos/Makefile b/libsrc/geos/Makefile index 25d908534..8b4aae9e5 100644 --- a/libsrc/geos/Makefile +++ b/libsrc/geos/Makefile @@ -4,7 +4,7 @@ # # Maciej 'YTM/Elysium' Witkowiak -OBJ_DIRS=common conio devel disk dlgbox file graph menuicon memory mousesprite process system +OBJ_DIRS=common conio devel disk dlgbox file graph menuicon memory mousesprite process runtime system all: @for i in $(OBJ_DIRS); do $(MAKE) -C $$i; done diff --git a/libsrc/geos/common/Makefile b/libsrc/geos/common/Makefile index 45eab4c4e..575d4e1c1 100644 --- a/libsrc/geos/common/Makefile +++ b/libsrc/geos/common/Makefile @@ -11,7 +11,7 @@ @$(AS) -o $@ $(AFLAGS) $< C_OBJS = _afailed.o abort.o perror.o -S_OBJS = copydata.o memcpy.o memset.o +S_OBJS = copydata.o memcpy.o memset.o zerobss.o all: $(C_OBJS) $(S_OBJS) diff --git a/libsrc/geos/common/zerobss.s b/libsrc/geos/common/zerobss.s new file mode 100644 index 000000000..3d1c28600 --- /dev/null +++ b/libsrc/geos/common/zerobss.s @@ -0,0 +1,27 @@ +; +; Maciej 'YTM/Elysium' Witkowiak +; 23.12.2002 +; +; Zero the bss segment. +; + + .export zerobss + .import __BSS_RUN__, __BSS_SIZE__ + + .include "../inc/jumptab.inc" + .include "../inc/geossym.inc" + +.code + +zerobss: + lda #<__BSS_SIZE__ + ldx #>__BSS_SIZE__ + sta r0L + stx r0H + lda #0 + sta r2L + lda #<__BSS_RUN__ + ldx #>__BSS_RUN__ + sta r1L + stx r1H + jmp FillRam diff --git a/libsrc/geos/runtime/Makefile b/libsrc/geos/runtime/Makefile new file mode 100644 index 000000000..a3b1fd99a --- /dev/null +++ b/libsrc/geos/runtime/Makefile @@ -0,0 +1,21 @@ +# +# Makefile for GEOS lib +# for cc65 +# + +%.o: %.c + @$(CC) $(CFLAGS) $< + @$(AS) -g -o $@ $(AFLAGS) $(*).s + +%.o: %.s + @$(AS) -o $@ $(AFLAGS) $< + +C_OBJS = +S_OBJS = call.o + +all: $(C_OBJS) $(S_OBJS) + +clean: + @rm -f *.~ $(S_OBJS) core + @rm -f $(C_OBJS:.o=.s) + @rm -f $(C_OBJS) diff --git a/libsrc/geos/runtime/call.s b/libsrc/geos/runtime/call.s new file mode 100644 index 000000000..448a87fdf --- /dev/null +++ b/libsrc/geos/runtime/call.s @@ -0,0 +1,12 @@ +; +; Maciej 'YTM/Elysium' Witkowiak +; 23.12.2002 +; +; CC65 runtime: call function via pointer in ax +; + + .include "../inc/jumptab.inc" + + .export callax + +callax = CallRoutine -- 2.39.5