]> git.sur5r.net Git - cc65/commitdiff
more GEOS Kernal replacements for common/ and runtime/ routines
authorizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 23 Dec 2002 20:44:17 +0000 (20:44 +0000)
committerizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 23 Dec 2002 20:44:17 +0000 (20:44 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1833 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/geos/Makefile
libsrc/geos/common/Makefile
libsrc/geos/common/zerobss.s [new file with mode: 0644]
libsrc/geos/runtime/Makefile [new file with mode: 0644]
libsrc/geos/runtime/call.s [new file with mode: 0644]

index 25d90853489a2fcca29ce973d176791e68c4f225..8b4aae9e5ca84cbcc3759afc9dff5a6136759c94 100644 (file)
@@ -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
index 45eab4c4e059b11f4cef02a83dea61ba7baaae98..575d4e1c14cad56292ab6dc31d50635603530486 100644 (file)
@@ -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 (file)
index 0000000..3d1c286
--- /dev/null
@@ -0,0 +1,27 @@
+;
+; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl>
+; 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 (file)
index 0000000..a3b1fd9
--- /dev/null
@@ -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 (file)
index 0000000..448a87f
--- /dev/null
@@ -0,0 +1,12 @@
+;
+; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl>
+; 23.12.2002
+;
+; CC65 runtime: call function via pointer in ax
+;
+
+        .include "../inc/jumptab.inc"
+
+       .export         callax
+
+callax = CallRoutine