From: ol.sc Date: Sat, 4 Feb 2012 14:53:09 +0000 (+0000) Subject: Moved the 'memory' files from 'geos-cbm' to 'geos-common' which are believed to work... X-Git-Tag: V2.13.3~27 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=abc9eba009eaf535e42590d0c262ef34b3203567;p=cc65 Moved the 'memory' files from 'geos-cbm' to 'geos-common' which are believed to work as-is on Apple GEOS too. The REU stuff isn't available on Apple GEOS. git-svn-id: svn://svn.cc65.org/cc65/trunk@5438 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/geos-cbm/memory/Makefile b/libsrc/geos-cbm/memory/Makefile index ea55bc2ad..8911b68f4 100644 --- a/libsrc/geos-cbm/memory/Makefile +++ b/libsrc/geos-cbm/memory/Makefile @@ -5,19 +5,8 @@ #-------------------------------------------------------------------------- # Object files -S_OBJS += crc.o \ - doublepop.o \ - reuregs.o \ - clearram.o \ - fillram.o \ - initram.o \ - movedata.o \ +S_OBJS += reuregs.o \ stashram.o \ fetchram.o \ swapram.o \ - verifyram.o \ - doublespop.o \ - copystring.o \ - cmpstring.o \ - copyfstring.o \ - cmpfstring.o + verifyram.o diff --git a/libsrc/geos-cbm/memory/clearram.s b/libsrc/geos-cbm/memory/clearram.s deleted file mode 100644 index 11e578dbe..000000000 --- a/libsrc/geos-cbm/memory/clearram.s +++ /dev/null @@ -1,25 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 30.10.99, 20.08.2003 - -; void * ClearRam (char *dest, int length); - - .import DoublePop - .export _ClearRam - - .include "jumptab.inc" - .include "geossym.inc" - -_ClearRam: - jsr DoublePop - pha - txa - pha - jsr ClearRam - pla - tax - pla - rts - diff --git a/libsrc/geos-cbm/memory/cmpfstring.s b/libsrc/geos-cbm/memory/cmpfstring.s deleted file mode 100644 index b4aeb6845..000000000 --- a/libsrc/geos-cbm/memory/cmpfstring.s +++ /dev/null @@ -1,22 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 22.12.99, 29.07.2000 - -; char CmpFString (char length, char *dest, char* source); - - .import DoubleSPop, SetPtrXY - .import popa, return0, return1 - .export _CmpFString - - .include "jumptab.inc" - -_CmpFString: - jsr DoubleSPop - jsr popa - jsr SetPtrXY - jsr CmpFString - bne L1 - jmp return0 -L1: jmp return1 diff --git a/libsrc/geos-cbm/memory/cmpstring.s b/libsrc/geos-cbm/memory/cmpstring.s deleted file mode 100644 index 532c50928..000000000 --- a/libsrc/geos-cbm/memory/cmpstring.s +++ /dev/null @@ -1,20 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 22.12.1999, 2.1.2003 - -; char CmpString (char *dest, char* source); - - .import DoubleSPop - .import return0, return1 - .export _CmpString - - .include "jumptab.inc" - -_CmpString: - jsr DoubleSPop - jsr CmpString - bne L1 - jmp return0 -L1: jmp return1 diff --git a/libsrc/geos-cbm/memory/copyfstring.s b/libsrc/geos-cbm/memory/copyfstring.s deleted file mode 100644 index bb963743e..000000000 --- a/libsrc/geos-cbm/memory/copyfstring.s +++ /dev/null @@ -1,19 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 22.12.99, 29.07.2000 - -; void CopyFString (char length, char *dest, char* source); - - .import DoubleSPop, SetPtrXY - .import popa - .export _CopyFString - - .include "jumptab.inc" - -_CopyFString: - jsr DoubleSPop - jsr popa - jsr SetPtrXY - jmp CopyFString diff --git a/libsrc/geos-cbm/memory/copystring.s b/libsrc/geos-cbm/memory/copystring.s deleted file mode 100644 index 60a1aa02b..000000000 --- a/libsrc/geos-cbm/memory/copystring.s +++ /dev/null @@ -1,16 +0,0 @@ - -; -; Maciej 'YTM/Alliance' Witkowiak -; -; 22.12.99 - -; void CopyString (char *dest, char* source); - - .import DoubleSPop - .export _CopyString - - .include "jumptab.inc" - -_CopyString: - jsr DoubleSPop - jmp CopyString diff --git a/libsrc/geos-cbm/memory/crc.s b/libsrc/geos-cbm/memory/crc.s deleted file mode 100644 index 7f6f98e56..000000000 --- a/libsrc/geos-cbm/memory/crc.s +++ /dev/null @@ -1,21 +0,0 @@ - -; -; Maciej 'YTM/Alliance' Witkowiak -; -; 22.12.99 - -; int CRC (char *memory, int length); - - .import DoublePop - .export _CRC - - .include "jumptab.inc" - .include "geossym.inc" - -_CRC: - jsr DoublePop - jsr CRC - lda r2L - ldx r2H - rts - \ No newline at end of file diff --git a/libsrc/geos-cbm/memory/doublepop.s b/libsrc/geos-cbm/memory/doublepop.s deleted file mode 100644 index 855265e92..000000000 --- a/libsrc/geos-cbm/memory/doublepop.s +++ /dev/null @@ -1,18 +0,0 @@ - -; -; Maciej 'YTM/Alliance' Witkowiak -; -; 31.12.99 - - .import popax - .export DoublePop - - .include "geossym.inc" - -DoublePop: - sta r0L - stx r0H - jsr popax - sta r1L - stx r1H - rts diff --git a/libsrc/geos-cbm/memory/doublespop.s b/libsrc/geos-cbm/memory/doublespop.s deleted file mode 100644 index 6a1165f3c..000000000 --- a/libsrc/geos-cbm/memory/doublespop.s +++ /dev/null @@ -1,28 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 22.12.99, 29.07.2000 - - .import popax - .importzp ptr3, ptr4 - .export DoubleSPop - .export SetPtrXY - - .include "geossym.inc" - -DoubleSPop: - sta ptr4 - stx ptr4+1 - jsr popax - sta ptr3 - stx ptr3+1 -; rts -; -; SetPtrXY can be sometimes executed twice, but even this way it is few cycles -; faster... - -SetPtrXY: - ldx #ptr4 - ldy #ptr3 - rts diff --git a/libsrc/geos-cbm/memory/fillram.s b/libsrc/geos-cbm/memory/fillram.s deleted file mode 100644 index f2eb51fbe..000000000 --- a/libsrc/geos-cbm/memory/fillram.s +++ /dev/null @@ -1,30 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 30.10.99, 15.07.2001 - -; void * FillRam (char *dest, char what, int length); - - .import popa, popax - .export _FillRam - - .include "jumptab.inc" - .include "geossym.inc" - -_FillRam: - sta r0L - stx r0H - jsr popa - sta r2L - jsr popax - sta r1L - stx r1H - pha - txa - pha - jsr FillRam - pla - tax - pla - rts diff --git a/libsrc/geos-cbm/memory/initram.s b/libsrc/geos-cbm/memory/initram.s deleted file mode 100644 index 6127985a0..000000000 --- a/libsrc/geos-cbm/memory/initram.s +++ /dev/null @@ -1,17 +0,0 @@ - -; -; Maciej 'YTM/Alliance' Witkowiak -; -; 30.10.99 - -; void InitRam (struct inittab*); - - .export _InitRam - - .include "jumptab.inc" - .include "geossym.inc" - -_InitRam: - sta r0L - stx r0H - jmp InitRam diff --git a/libsrc/geos-cbm/memory/movedata.s b/libsrc/geos-cbm/memory/movedata.s deleted file mode 100644 index 656285df5..000000000 --- a/libsrc/geos-cbm/memory/movedata.s +++ /dev/null @@ -1,27 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 30.10.99, 15.07.2001 - -; void* MoveData (char* dest, char *source, int length); - - .import popax - .export _MoveData - - .include "jumptab.inc" - .include "geossym.inc" - -_MoveData: - sta r2L - stx r2H - jsr popax - sta r0L - stx r0H - jsr popax - sta r1L - stx r1H - jsr MoveData - lda r1L ; return dest ptr to be compatible with memmove and memcpy - ldx r1H - rts diff --git a/libsrc/geos-common/Makefile b/libsrc/geos-common/Makefile index 2e2f88ba8..0c316db90 100644 --- a/libsrc/geos-common/Makefile +++ b/libsrc/geos-common/Makefile @@ -30,7 +30,8 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include # Directories DIRS = dlgbox \ - file + file \ + memory #-------------------------------------------------------------------------- # Directives diff --git a/libsrc/geos-common/memory/Makefile b/libsrc/geos-common/memory/Makefile new file mode 100644 index 000000000..e5fb77aff --- /dev/null +++ b/libsrc/geos-common/memory/Makefile @@ -0,0 +1,18 @@ +# +# makefile for CC65 runtime library +# + +#-------------------------------------------------------------------------- +# Object files + +S_OBJS += crc.o \ + doublepop.o \ + clearram.o \ + fillram.o \ + initram.o \ + movedata.o \ + doublespop.o \ + copystring.o \ + cmpstring.o \ + copyfstring.o \ + cmpfstring.o diff --git a/libsrc/geos-common/memory/clearram.s b/libsrc/geos-common/memory/clearram.s new file mode 100644 index 000000000..11e578dbe --- /dev/null +++ b/libsrc/geos-common/memory/clearram.s @@ -0,0 +1,25 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 30.10.99, 20.08.2003 + +; void * ClearRam (char *dest, int length); + + .import DoublePop + .export _ClearRam + + .include "jumptab.inc" + .include "geossym.inc" + +_ClearRam: + jsr DoublePop + pha + txa + pha + jsr ClearRam + pla + tax + pla + rts + diff --git a/libsrc/geos-common/memory/cmpfstring.s b/libsrc/geos-common/memory/cmpfstring.s new file mode 100644 index 000000000..b4aeb6845 --- /dev/null +++ b/libsrc/geos-common/memory/cmpfstring.s @@ -0,0 +1,22 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 22.12.99, 29.07.2000 + +; char CmpFString (char length, char *dest, char* source); + + .import DoubleSPop, SetPtrXY + .import popa, return0, return1 + .export _CmpFString + + .include "jumptab.inc" + +_CmpFString: + jsr DoubleSPop + jsr popa + jsr SetPtrXY + jsr CmpFString + bne L1 + jmp return0 +L1: jmp return1 diff --git a/libsrc/geos-common/memory/cmpstring.s b/libsrc/geos-common/memory/cmpstring.s new file mode 100644 index 000000000..532c50928 --- /dev/null +++ b/libsrc/geos-common/memory/cmpstring.s @@ -0,0 +1,20 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 22.12.1999, 2.1.2003 + +; char CmpString (char *dest, char* source); + + .import DoubleSPop + .import return0, return1 + .export _CmpString + + .include "jumptab.inc" + +_CmpString: + jsr DoubleSPop + jsr CmpString + bne L1 + jmp return0 +L1: jmp return1 diff --git a/libsrc/geos-common/memory/copyfstring.s b/libsrc/geos-common/memory/copyfstring.s new file mode 100644 index 000000000..bb963743e --- /dev/null +++ b/libsrc/geos-common/memory/copyfstring.s @@ -0,0 +1,19 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 22.12.99, 29.07.2000 + +; void CopyFString (char length, char *dest, char* source); + + .import DoubleSPop, SetPtrXY + .import popa + .export _CopyFString + + .include "jumptab.inc" + +_CopyFString: + jsr DoubleSPop + jsr popa + jsr SetPtrXY + jmp CopyFString diff --git a/libsrc/geos-common/memory/copystring.s b/libsrc/geos-common/memory/copystring.s new file mode 100644 index 000000000..60a1aa02b --- /dev/null +++ b/libsrc/geos-common/memory/copystring.s @@ -0,0 +1,16 @@ + +; +; Maciej 'YTM/Alliance' Witkowiak +; +; 22.12.99 + +; void CopyString (char *dest, char* source); + + .import DoubleSPop + .export _CopyString + + .include "jumptab.inc" + +_CopyString: + jsr DoubleSPop + jmp CopyString diff --git a/libsrc/geos-common/memory/crc.s b/libsrc/geos-common/memory/crc.s new file mode 100644 index 000000000..7f6f98e56 --- /dev/null +++ b/libsrc/geos-common/memory/crc.s @@ -0,0 +1,21 @@ + +; +; Maciej 'YTM/Alliance' Witkowiak +; +; 22.12.99 + +; int CRC (char *memory, int length); + + .import DoublePop + .export _CRC + + .include "jumptab.inc" + .include "geossym.inc" + +_CRC: + jsr DoublePop + jsr CRC + lda r2L + ldx r2H + rts + \ No newline at end of file diff --git a/libsrc/geos-common/memory/doublepop.s b/libsrc/geos-common/memory/doublepop.s new file mode 100644 index 000000000..855265e92 --- /dev/null +++ b/libsrc/geos-common/memory/doublepop.s @@ -0,0 +1,18 @@ + +; +; Maciej 'YTM/Alliance' Witkowiak +; +; 31.12.99 + + .import popax + .export DoublePop + + .include "geossym.inc" + +DoublePop: + sta r0L + stx r0H + jsr popax + sta r1L + stx r1H + rts diff --git a/libsrc/geos-common/memory/doublespop.s b/libsrc/geos-common/memory/doublespop.s new file mode 100644 index 000000000..6a1165f3c --- /dev/null +++ b/libsrc/geos-common/memory/doublespop.s @@ -0,0 +1,28 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 22.12.99, 29.07.2000 + + .import popax + .importzp ptr3, ptr4 + .export DoubleSPop + .export SetPtrXY + + .include "geossym.inc" + +DoubleSPop: + sta ptr4 + stx ptr4+1 + jsr popax + sta ptr3 + stx ptr3+1 +; rts +; +; SetPtrXY can be sometimes executed twice, but even this way it is few cycles +; faster... + +SetPtrXY: + ldx #ptr4 + ldy #ptr3 + rts diff --git a/libsrc/geos-common/memory/fillram.s b/libsrc/geos-common/memory/fillram.s new file mode 100644 index 000000000..f2eb51fbe --- /dev/null +++ b/libsrc/geos-common/memory/fillram.s @@ -0,0 +1,30 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 30.10.99, 15.07.2001 + +; void * FillRam (char *dest, char what, int length); + + .import popa, popax + .export _FillRam + + .include "jumptab.inc" + .include "geossym.inc" + +_FillRam: + sta r0L + stx r0H + jsr popa + sta r2L + jsr popax + sta r1L + stx r1H + pha + txa + pha + jsr FillRam + pla + tax + pla + rts diff --git a/libsrc/geos-common/memory/initram.s b/libsrc/geos-common/memory/initram.s new file mode 100644 index 000000000..6127985a0 --- /dev/null +++ b/libsrc/geos-common/memory/initram.s @@ -0,0 +1,17 @@ + +; +; Maciej 'YTM/Alliance' Witkowiak +; +; 30.10.99 + +; void InitRam (struct inittab*); + + .export _InitRam + + .include "jumptab.inc" + .include "geossym.inc" + +_InitRam: + sta r0L + stx r0H + jmp InitRam diff --git a/libsrc/geos-common/memory/movedata.s b/libsrc/geos-common/memory/movedata.s new file mode 100644 index 000000000..656285df5 --- /dev/null +++ b/libsrc/geos-common/memory/movedata.s @@ -0,0 +1,27 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 30.10.99, 15.07.2001 + +; void* MoveData (char* dest, char *source, int length); + + .import popax + .export _MoveData + + .include "jumptab.inc" + .include "geossym.inc" + +_MoveData: + sta r2L + stx r2H + jsr popax + sta r0L + stx r0H + jsr popax + sta r1L + stx r1H + jsr MoveData + lda r1L ; return dest ptr to be compatible with memmove and memcpy + ldx r1H + rts