From: ol.sc Date: Sat, 4 Feb 2012 14:08:37 +0000 (+0000) Subject: Moved the 'file' files from 'geos-cbm' to 'geos-common' which are believed to work... X-Git-Tag: V2.13.3~28 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2f10491672dbc108020a55a381a6c0fe3c3b5218;p=cc65 Moved the 'file' files from 'geos-cbm' to 'geos-common' which are believed to work as-is on Apple GEOS too. 'FollowChain' isn't available on Apple GEOS. git-svn-id: svn://svn.cc65.org/cc65/trunk@5437 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/geos-cbm/file/Makefile b/libsrc/geos-cbm/file/Makefile index a62f19878..a92db605e 100644 --- a/libsrc/geos-cbm/file/Makefile +++ b/libsrc/geos-cbm/file/Makefile @@ -5,29 +5,4 @@ #-------------------------------------------------------------------------- # Object files -S_OBJS += get1stdirentry.o \ - getnxtdirentry.o \ - openrecordfile.o \ - closerecordfile.o \ - nextrecord.o \ - previousrecord.o \ - pointrecord.o \ - deleterecord.o \ - insertrecord.o \ - appendrecord.o \ - readrecord.o \ - writerecord.o \ - updaterecordfile.o \ - findfile.o \ - followchain.o \ - getfhdrinfo.o \ - readfile.o \ - savefile.o \ - freefile.o \ - deletefile.o \ - renamefile.o \ - findftypes.o \ - readbyte.o \ - getfile.o \ - sysremove.o \ - sysrename.o +S_OBJS += followchain.o diff --git a/libsrc/geos-cbm/file/appendrecord.s b/libsrc/geos-cbm/file/appendrecord.s deleted file mode 100644 index 26b99a1a8..000000000 --- a/libsrc/geos-cbm/file/appendrecord.s +++ /dev/null @@ -1,17 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char AppendRecord (void); - - .import setoserror - .export _AppendRecord - - .include "jumptab.inc" - -_AppendRecord: - - jsr AppendRecord - jmp setoserror diff --git a/libsrc/geos-cbm/file/closerecordfile.s b/libsrc/geos-cbm/file/closerecordfile.s deleted file mode 100644 index 1daa799a2..000000000 --- a/libsrc/geos-cbm/file/closerecordfile.s +++ /dev/null @@ -1,16 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char CloseRecordFile (void); - - .import setoserror - .export _CloseRecordFile - - .include "jumptab.inc" - -_CloseRecordFile: - jsr CloseRecordFile - jmp setoserror diff --git a/libsrc/geos-cbm/file/deletefile.s b/libsrc/geos-cbm/file/deletefile.s deleted file mode 100644 index 4fb9dd7b0..000000000 --- a/libsrc/geos-cbm/file/deletefile.s +++ /dev/null @@ -1,19 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char DeleteFile (char *myName); - - .import setoserror - .export _DeleteFile - - .include "jumptab.inc" - .include "geossym.inc" - -_DeleteFile: - sta r0L - stx r0H - jsr DeleteFile - jmp setoserror diff --git a/libsrc/geos-cbm/file/deleterecord.s b/libsrc/geos-cbm/file/deleterecord.s deleted file mode 100644 index fe40ad91d..000000000 --- a/libsrc/geos-cbm/file/deleterecord.s +++ /dev/null @@ -1,17 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char DeleteRecord (void); - - .import setoserror - .export _DeleteRecord - - .include "jumptab.inc" - .include "geossym.inc" - -_DeleteRecord: - jsr DeleteRecord - jmp setoserror diff --git a/libsrc/geos-cbm/file/findfile.s b/libsrc/geos-cbm/file/findfile.s deleted file mode 100644 index fe9c18912..000000000 --- a/libsrc/geos-cbm/file/findfile.s +++ /dev/null @@ -1,19 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char FindFile (char *myName); - - .import setoserror - .export _FindFile - - .include "jumptab.inc" - .include "geossym.inc" - -_FindFile: - sta r6L - stx r6H - jsr FindFile - jmp setoserror diff --git a/libsrc/geos-cbm/file/findftypes.s b/libsrc/geos-cbm/file/findftypes.s deleted file mode 100644 index 7cb485815..000000000 --- a/libsrc/geos-cbm/file/findftypes.s +++ /dev/null @@ -1,38 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char FindFTypes (char *buffer, char fileType, char fileMax, char *Class); - - .export _FindFTypes - .import popax, popa, setoserror - - .include "jumptab.inc" - .include "geossym.inc" - -.code - -_FindFTypes: - sta r10L - stx r10H - jsr popa - sta r7H - sta tmpFileMax - jsr popa - sta r7L - jsr popax - sta r6L - stx r6H - jsr FindFTypes - jsr setoserror -; return (fileMax - r7H) - lda tmpFileMax - sec - sbc r7H - rts - -.bss - -tmpFileMax: .res 1 diff --git a/libsrc/geos-cbm/file/freefile.s b/libsrc/geos-cbm/file/freefile.s deleted file mode 100644 index e4a4344f5..000000000 --- a/libsrc/geos-cbm/file/freefile.s +++ /dev/null @@ -1,19 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char FreeFile (struct trse myTrSe[]); - - .import setoserror - .export _FreeFile - - .include "jumptab.inc" - .include "geossym.inc" - -_FreeFile: - sta r9L - stx r9H - jsr FreeFile - jmp setoserror diff --git a/libsrc/geos-cbm/file/get1stdirentry.s b/libsrc/geos-cbm/file/get1stdirentry.s deleted file mode 100644 index 60b677914..000000000 --- a/libsrc/geos-cbm/file/get1stdirentry.s +++ /dev/null @@ -1,20 +0,0 @@ - -; -; Maciej 'YTM/Alliance' Witkowiak -; -; 26.10.99 - -; struct filehandle* Get1stDirEntry (void); - - .import __oserror - .export _Get1stDirEntry - - .include "diskdrv.inc" - .include "geossym.inc" - -_Get1stDirEntry: - jsr Get1stDirEntry - stx __oserror - lda r5L - ldx r5H - rts diff --git a/libsrc/geos-cbm/file/getfhdrinfo.s b/libsrc/geos-cbm/file/getfhdrinfo.s deleted file mode 100644 index 55e7a49e2..000000000 --- a/libsrc/geos-cbm/file/getfhdrinfo.s +++ /dev/null @@ -1,19 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char GetFHdrInfo (struct filehandle *myFile); - - .import setoserror - .export _GetFHdrInfo - - .include "jumptab.inc" - .include "geossym.inc" - -_GetFHdrInfo: - sta r9L - stx r9H - jsr GetFHdrInfo - jmp setoserror diff --git a/libsrc/geos-cbm/file/getfile.s b/libsrc/geos-cbm/file/getfile.s deleted file mode 100644 index f8bc908eb..000000000 --- a/libsrc/geos-cbm/file/getfile.s +++ /dev/null @@ -1,32 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 4.4.2003 - -; char __fastcall__ GetFile(char flag, const char *fname, const char *loadaddr, const char *datadname, char *datafname); - - .export _GetFile - .import popa, popax, setoserror - - .include "jumptab.inc" - .include "geossym.inc" - -_GetFile: - sta r3L - stx r3H - jsr popax - sta r2L - stx r2H - jsr popax - sta r7L - stx r7H - jsr popax - sta r6L - stx r6H - jsr popa - sta r0L - lda #0 - sta r10L - jsr GetFile - jmp setoserror diff --git a/libsrc/geos-cbm/file/getnxtdirentry.s b/libsrc/geos-cbm/file/getnxtdirentry.s deleted file mode 100644 index 72a7f68f4..000000000 --- a/libsrc/geos-cbm/file/getnxtdirentry.s +++ /dev/null @@ -1,20 +0,0 @@ - -; -; Maciej 'YTM/Alliance' Witkowiak -; -; 26.10.99 - -; struct filehandle* GetNxtDirEntry (void); - - .import __oserror - .export _GetNxtDirEntry - - .include "diskdrv.inc" - .include "geossym.inc" - -_GetNxtDirEntry: - jsr GetNxtDirEntry - stx __oserror - lda r5L - ldx r5H - rts diff --git a/libsrc/geos-cbm/file/insertrecord.s b/libsrc/geos-cbm/file/insertrecord.s deleted file mode 100644 index 1f5f886d8..000000000 --- a/libsrc/geos-cbm/file/insertrecord.s +++ /dev/null @@ -1,16 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char InsertRecord (void); - - .import setoserror - .export _InsertRecord - - .include "jumptab.inc" - -_InsertRecord: - jsr InsertRecord - jmp setoserror diff --git a/libsrc/geos-cbm/file/nextrecord.s b/libsrc/geos-cbm/file/nextrecord.s deleted file mode 100644 index bad208a41..000000000 --- a/libsrc/geos-cbm/file/nextrecord.s +++ /dev/null @@ -1,16 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char NextRecord (void); - - .import setoserror - .export _NextRecord - - .include "jumptab.inc" - -_NextRecord: - jsr NextRecord - jmp setoserror diff --git a/libsrc/geos-cbm/file/openrecordfile.s b/libsrc/geos-cbm/file/openrecordfile.s deleted file mode 100644 index 287bee71b..000000000 --- a/libsrc/geos-cbm/file/openrecordfile.s +++ /dev/null @@ -1,19 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char OpenRecordFile (char *myName); - - .import setoserror - .export _OpenRecordFile - - .include "jumptab.inc" - .include "geossym.inc" - -_OpenRecordFile: - sta r0L - stx r0H - jsr OpenRecordFile - jmp setoserror diff --git a/libsrc/geos-cbm/file/pointrecord.s b/libsrc/geos-cbm/file/pointrecord.s deleted file mode 100644 index 4149dc4f2..000000000 --- a/libsrc/geos-cbm/file/pointrecord.s +++ /dev/null @@ -1,16 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char PointRecord (char recordNum); - - .import setoserror - .export _PointRecord - - .include "jumptab.inc" - -_PointRecord: - jsr PointRecord - jmp setoserror diff --git a/libsrc/geos-cbm/file/previousrecord.s b/libsrc/geos-cbm/file/previousrecord.s deleted file mode 100644 index 560401891..000000000 --- a/libsrc/geos-cbm/file/previousrecord.s +++ /dev/null @@ -1,16 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char PreviousRecord (void); - - .import setoserror - .export _PreviousRecord - - .include "jumptab.inc" - -_PreviousRecord: - jsr PreviousRecord - jmp setoserror diff --git a/libsrc/geos-cbm/file/readbyte.s b/libsrc/geos-cbm/file/readbyte.s deleted file mode 100644 index e4408a3ec..000000000 --- a/libsrc/geos-cbm/file/readbyte.s +++ /dev/null @@ -1,18 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char ReadByte (void); - - .import __oserror - .export _ReadByte - - .include "jumptab.inc" - -_ReadByte: - jsr ReadByte - stx __oserror - ldx #0 - rts diff --git a/libsrc/geos-cbm/file/readfile.s b/libsrc/geos-cbm/file/readfile.s deleted file mode 100644 index a74f224df..000000000 --- a/libsrc/geos-cbm/file/readfile.s +++ /dev/null @@ -1,27 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char ReadFile (struct tr_se *myTS, char *buffer, int length); - - .export _ReadFile - .import popax, setoserror - .import gettrse - - .include "jumptab.inc" - .include "geossym.inc" - -_ReadFile: - sta r2L - stx r2H - jsr popax - sta r7L - stx r7H - jsr popax - jsr gettrse - sta r1L - stx r1H - jsr ReadFile - jmp setoserror diff --git a/libsrc/geos-cbm/file/readrecord.s b/libsrc/geos-cbm/file/readrecord.s deleted file mode 100644 index 493e3b6dd..000000000 --- a/libsrc/geos-cbm/file/readrecord.s +++ /dev/null @@ -1,22 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char ReadRecord (char *buffer, int length); - - .export _ReadRecord - .import popax, setoserror - - .include "jumptab.inc" - .include "geossym.inc" - -_ReadRecord: - sta r2L - stx r2H - jsr popax - sta r7L - stx r7H - jsr ReadRecord - jmp setoserror diff --git a/libsrc/geos-cbm/file/renamefile.s b/libsrc/geos-cbm/file/renamefile.s deleted file mode 100644 index f0f2cec2f..000000000 --- a/libsrc/geos-cbm/file/renamefile.s +++ /dev/null @@ -1,22 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char RenameFile (char *old, char *new); - - .export _RenameFile - .import popax, setoserror - - .include "jumptab.inc" - .include "geossym.inc" - -_RenameFile: - sta r0L - stx r0H - jsr popax - sta r6L - stx r6H - jsr RenameFile - jmp setoserror diff --git a/libsrc/geos-cbm/file/savefile.s b/libsrc/geos-cbm/file/savefile.s deleted file mode 100644 index 743e35bbb..000000000 --- a/libsrc/geos-cbm/file/savefile.s +++ /dev/null @@ -1,22 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char SaveFile (char skip, struct fileheader *myHeader); - - .import setoserror - .import popa - .export _SaveFile - - .include "jumptab.inc" - .include "geossym.inc" - -_SaveFile: - sta r9L - stx r9H - jsr popa - sta r10L - jsr SaveFile - jmp setoserror diff --git a/libsrc/geos-cbm/file/sysremove.s b/libsrc/geos-cbm/file/sysremove.s deleted file mode 100644 index fc30f93be..000000000 --- a/libsrc/geos-cbm/file/sysremove.s +++ /dev/null @@ -1,20 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 19.07.2005 - -; unsigned char __fastcall__ _sysremove (const char* name); - - .export __sysremove - - .include "jumptab.inc" - .include "geossym.inc" - -__sysremove: - sta r0L - stx r0H - jsr DeleteFile - txa - ldx #0 - rts diff --git a/libsrc/geos-cbm/file/sysrename.s b/libsrc/geos-cbm/file/sysrename.s deleted file mode 100644 index 541c2cc60..000000000 --- a/libsrc/geos-cbm/file/sysrename.s +++ /dev/null @@ -1,24 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 19.07.2005 - -; unsigned char __fastcall__ _sysrename (const char* oldname, const char* newname); - - .export __sysrename - .import popax - - .include "jumptab.inc" - .include "geossym.inc" - -__sysrename: - sta r0L - stx r0H - jsr popax - sta r6L - stx r6H - jsr RenameFile - txa - ldx #0 - rts diff --git a/libsrc/geos-cbm/file/updaterecordfile.s b/libsrc/geos-cbm/file/updaterecordfile.s deleted file mode 100644 index b46440c6e..000000000 --- a/libsrc/geos-cbm/file/updaterecordfile.s +++ /dev/null @@ -1,16 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char UpdateRecordFile (void); - - .import setoserror - .export _UpdateRecordFile - - .include "jumptab.inc" - -_UpdateRecordFile: - jsr UpdateRecordFile - jmp setoserror diff --git a/libsrc/geos-cbm/file/writerecord.s b/libsrc/geos-cbm/file/writerecord.s deleted file mode 100644 index 13da13048..000000000 --- a/libsrc/geos-cbm/file/writerecord.s +++ /dev/null @@ -1,22 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 25.12.1999, 2.1.2003 - -; char WriteRecord (char *buffer, int length); - - .export _WriteRecord - .import popax, setoserror - - .include "jumptab.inc" - .include "geossym.inc" - -_WriteRecord: - sta r2L - stx r2H - jsr popax - sta r7L - stx r7H - jsr WriteRecord - jmp setoserror diff --git a/libsrc/geos-common/Makefile b/libsrc/geos-common/Makefile index e884c1bd5..2e2f88ba8 100644 --- a/libsrc/geos-common/Makefile +++ b/libsrc/geos-common/Makefile @@ -29,7 +29,8 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include #-------------------------------------------------------------------------- # Directories -DIRS = dlgbox +DIRS = dlgbox \ + file #-------------------------------------------------------------------------- # Directives diff --git a/libsrc/geos-common/file/Makefile b/libsrc/geos-common/file/Makefile new file mode 100644 index 000000000..b9ba76208 --- /dev/null +++ b/libsrc/geos-common/file/Makefile @@ -0,0 +1,32 @@ +# +# makefile for CC65 runtime library +# + +#-------------------------------------------------------------------------- +# Object files + +S_OBJS += get1stdirentry.o \ + getnxtdirentry.o \ + openrecordfile.o \ + closerecordfile.o \ + nextrecord.o \ + previousrecord.o \ + pointrecord.o \ + deleterecord.o \ + insertrecord.o \ + appendrecord.o \ + readrecord.o \ + writerecord.o \ + updaterecordfile.o \ + findfile.o \ + getfhdrinfo.o \ + readfile.o \ + savefile.o \ + freefile.o \ + deletefile.o \ + renamefile.o \ + findftypes.o \ + readbyte.o \ + getfile.o \ + sysremove.o \ + sysrename.o diff --git a/libsrc/geos-common/file/appendrecord.s b/libsrc/geos-common/file/appendrecord.s new file mode 100644 index 000000000..26b99a1a8 --- /dev/null +++ b/libsrc/geos-common/file/appendrecord.s @@ -0,0 +1,17 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char AppendRecord (void); + + .import setoserror + .export _AppendRecord + + .include "jumptab.inc" + +_AppendRecord: + + jsr AppendRecord + jmp setoserror diff --git a/libsrc/geos-common/file/closerecordfile.s b/libsrc/geos-common/file/closerecordfile.s new file mode 100644 index 000000000..1daa799a2 --- /dev/null +++ b/libsrc/geos-common/file/closerecordfile.s @@ -0,0 +1,16 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char CloseRecordFile (void); + + .import setoserror + .export _CloseRecordFile + + .include "jumptab.inc" + +_CloseRecordFile: + jsr CloseRecordFile + jmp setoserror diff --git a/libsrc/geos-common/file/deletefile.s b/libsrc/geos-common/file/deletefile.s new file mode 100644 index 000000000..4fb9dd7b0 --- /dev/null +++ b/libsrc/geos-common/file/deletefile.s @@ -0,0 +1,19 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char DeleteFile (char *myName); + + .import setoserror + .export _DeleteFile + + .include "jumptab.inc" + .include "geossym.inc" + +_DeleteFile: + sta r0L + stx r0H + jsr DeleteFile + jmp setoserror diff --git a/libsrc/geos-common/file/deleterecord.s b/libsrc/geos-common/file/deleterecord.s new file mode 100644 index 000000000..fe40ad91d --- /dev/null +++ b/libsrc/geos-common/file/deleterecord.s @@ -0,0 +1,17 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char DeleteRecord (void); + + .import setoserror + .export _DeleteRecord + + .include "jumptab.inc" + .include "geossym.inc" + +_DeleteRecord: + jsr DeleteRecord + jmp setoserror diff --git a/libsrc/geos-common/file/findfile.s b/libsrc/geos-common/file/findfile.s new file mode 100644 index 000000000..fe9c18912 --- /dev/null +++ b/libsrc/geos-common/file/findfile.s @@ -0,0 +1,19 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char FindFile (char *myName); + + .import setoserror + .export _FindFile + + .include "jumptab.inc" + .include "geossym.inc" + +_FindFile: + sta r6L + stx r6H + jsr FindFile + jmp setoserror diff --git a/libsrc/geos-common/file/findftypes.s b/libsrc/geos-common/file/findftypes.s new file mode 100644 index 000000000..7cb485815 --- /dev/null +++ b/libsrc/geos-common/file/findftypes.s @@ -0,0 +1,38 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char FindFTypes (char *buffer, char fileType, char fileMax, char *Class); + + .export _FindFTypes + .import popax, popa, setoserror + + .include "jumptab.inc" + .include "geossym.inc" + +.code + +_FindFTypes: + sta r10L + stx r10H + jsr popa + sta r7H + sta tmpFileMax + jsr popa + sta r7L + jsr popax + sta r6L + stx r6H + jsr FindFTypes + jsr setoserror +; return (fileMax - r7H) + lda tmpFileMax + sec + sbc r7H + rts + +.bss + +tmpFileMax: .res 1 diff --git a/libsrc/geos-common/file/freefile.s b/libsrc/geos-common/file/freefile.s new file mode 100644 index 000000000..e4a4344f5 --- /dev/null +++ b/libsrc/geos-common/file/freefile.s @@ -0,0 +1,19 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char FreeFile (struct trse myTrSe[]); + + .import setoserror + .export _FreeFile + + .include "jumptab.inc" + .include "geossym.inc" + +_FreeFile: + sta r9L + stx r9H + jsr FreeFile + jmp setoserror diff --git a/libsrc/geos-common/file/get1stdirentry.s b/libsrc/geos-common/file/get1stdirentry.s new file mode 100644 index 000000000..60b677914 --- /dev/null +++ b/libsrc/geos-common/file/get1stdirentry.s @@ -0,0 +1,20 @@ + +; +; Maciej 'YTM/Alliance' Witkowiak +; +; 26.10.99 + +; struct filehandle* Get1stDirEntry (void); + + .import __oserror + .export _Get1stDirEntry + + .include "diskdrv.inc" + .include "geossym.inc" + +_Get1stDirEntry: + jsr Get1stDirEntry + stx __oserror + lda r5L + ldx r5H + rts diff --git a/libsrc/geos-common/file/getfhdrinfo.s b/libsrc/geos-common/file/getfhdrinfo.s new file mode 100644 index 000000000..55e7a49e2 --- /dev/null +++ b/libsrc/geos-common/file/getfhdrinfo.s @@ -0,0 +1,19 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char GetFHdrInfo (struct filehandle *myFile); + + .import setoserror + .export _GetFHdrInfo + + .include "jumptab.inc" + .include "geossym.inc" + +_GetFHdrInfo: + sta r9L + stx r9H + jsr GetFHdrInfo + jmp setoserror diff --git a/libsrc/geos-common/file/getfile.s b/libsrc/geos-common/file/getfile.s new file mode 100644 index 000000000..f8bc908eb --- /dev/null +++ b/libsrc/geos-common/file/getfile.s @@ -0,0 +1,32 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 4.4.2003 + +; char __fastcall__ GetFile(char flag, const char *fname, const char *loadaddr, const char *datadname, char *datafname); + + .export _GetFile + .import popa, popax, setoserror + + .include "jumptab.inc" + .include "geossym.inc" + +_GetFile: + sta r3L + stx r3H + jsr popax + sta r2L + stx r2H + jsr popax + sta r7L + stx r7H + jsr popax + sta r6L + stx r6H + jsr popa + sta r0L + lda #0 + sta r10L + jsr GetFile + jmp setoserror diff --git a/libsrc/geos-common/file/getnxtdirentry.s b/libsrc/geos-common/file/getnxtdirentry.s new file mode 100644 index 000000000..72a7f68f4 --- /dev/null +++ b/libsrc/geos-common/file/getnxtdirentry.s @@ -0,0 +1,20 @@ + +; +; Maciej 'YTM/Alliance' Witkowiak +; +; 26.10.99 + +; struct filehandle* GetNxtDirEntry (void); + + .import __oserror + .export _GetNxtDirEntry + + .include "diskdrv.inc" + .include "geossym.inc" + +_GetNxtDirEntry: + jsr GetNxtDirEntry + stx __oserror + lda r5L + ldx r5H + rts diff --git a/libsrc/geos-common/file/insertrecord.s b/libsrc/geos-common/file/insertrecord.s new file mode 100644 index 000000000..1f5f886d8 --- /dev/null +++ b/libsrc/geos-common/file/insertrecord.s @@ -0,0 +1,16 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char InsertRecord (void); + + .import setoserror + .export _InsertRecord + + .include "jumptab.inc" + +_InsertRecord: + jsr InsertRecord + jmp setoserror diff --git a/libsrc/geos-common/file/nextrecord.s b/libsrc/geos-common/file/nextrecord.s new file mode 100644 index 000000000..bad208a41 --- /dev/null +++ b/libsrc/geos-common/file/nextrecord.s @@ -0,0 +1,16 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char NextRecord (void); + + .import setoserror + .export _NextRecord + + .include "jumptab.inc" + +_NextRecord: + jsr NextRecord + jmp setoserror diff --git a/libsrc/geos-common/file/openrecordfile.s b/libsrc/geos-common/file/openrecordfile.s new file mode 100644 index 000000000..287bee71b --- /dev/null +++ b/libsrc/geos-common/file/openrecordfile.s @@ -0,0 +1,19 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char OpenRecordFile (char *myName); + + .import setoserror + .export _OpenRecordFile + + .include "jumptab.inc" + .include "geossym.inc" + +_OpenRecordFile: + sta r0L + stx r0H + jsr OpenRecordFile + jmp setoserror diff --git a/libsrc/geos-common/file/pointrecord.s b/libsrc/geos-common/file/pointrecord.s new file mode 100644 index 000000000..4149dc4f2 --- /dev/null +++ b/libsrc/geos-common/file/pointrecord.s @@ -0,0 +1,16 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char PointRecord (char recordNum); + + .import setoserror + .export _PointRecord + + .include "jumptab.inc" + +_PointRecord: + jsr PointRecord + jmp setoserror diff --git a/libsrc/geos-common/file/previousrecord.s b/libsrc/geos-common/file/previousrecord.s new file mode 100644 index 000000000..560401891 --- /dev/null +++ b/libsrc/geos-common/file/previousrecord.s @@ -0,0 +1,16 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char PreviousRecord (void); + + .import setoserror + .export _PreviousRecord + + .include "jumptab.inc" + +_PreviousRecord: + jsr PreviousRecord + jmp setoserror diff --git a/libsrc/geos-common/file/readbyte.s b/libsrc/geos-common/file/readbyte.s new file mode 100644 index 000000000..e4408a3ec --- /dev/null +++ b/libsrc/geos-common/file/readbyte.s @@ -0,0 +1,18 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char ReadByte (void); + + .import __oserror + .export _ReadByte + + .include "jumptab.inc" + +_ReadByte: + jsr ReadByte + stx __oserror + ldx #0 + rts diff --git a/libsrc/geos-common/file/readfile.s b/libsrc/geos-common/file/readfile.s new file mode 100644 index 000000000..a74f224df --- /dev/null +++ b/libsrc/geos-common/file/readfile.s @@ -0,0 +1,27 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char ReadFile (struct tr_se *myTS, char *buffer, int length); + + .export _ReadFile + .import popax, setoserror + .import gettrse + + .include "jumptab.inc" + .include "geossym.inc" + +_ReadFile: + sta r2L + stx r2H + jsr popax + sta r7L + stx r7H + jsr popax + jsr gettrse + sta r1L + stx r1H + jsr ReadFile + jmp setoserror diff --git a/libsrc/geos-common/file/readrecord.s b/libsrc/geos-common/file/readrecord.s new file mode 100644 index 000000000..493e3b6dd --- /dev/null +++ b/libsrc/geos-common/file/readrecord.s @@ -0,0 +1,22 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char ReadRecord (char *buffer, int length); + + .export _ReadRecord + .import popax, setoserror + + .include "jumptab.inc" + .include "geossym.inc" + +_ReadRecord: + sta r2L + stx r2H + jsr popax + sta r7L + stx r7H + jsr ReadRecord + jmp setoserror diff --git a/libsrc/geos-common/file/renamefile.s b/libsrc/geos-common/file/renamefile.s new file mode 100644 index 000000000..f0f2cec2f --- /dev/null +++ b/libsrc/geos-common/file/renamefile.s @@ -0,0 +1,22 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char RenameFile (char *old, char *new); + + .export _RenameFile + .import popax, setoserror + + .include "jumptab.inc" + .include "geossym.inc" + +_RenameFile: + sta r0L + stx r0H + jsr popax + sta r6L + stx r6H + jsr RenameFile + jmp setoserror diff --git a/libsrc/geos-common/file/savefile.s b/libsrc/geos-common/file/savefile.s new file mode 100644 index 000000000..743e35bbb --- /dev/null +++ b/libsrc/geos-common/file/savefile.s @@ -0,0 +1,22 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char SaveFile (char skip, struct fileheader *myHeader); + + .import setoserror + .import popa + .export _SaveFile + + .include "jumptab.inc" + .include "geossym.inc" + +_SaveFile: + sta r9L + stx r9H + jsr popa + sta r10L + jsr SaveFile + jmp setoserror diff --git a/libsrc/geos-common/file/sysremove.s b/libsrc/geos-common/file/sysremove.s new file mode 100644 index 000000000..fc30f93be --- /dev/null +++ b/libsrc/geos-common/file/sysremove.s @@ -0,0 +1,20 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 19.07.2005 + +; unsigned char __fastcall__ _sysremove (const char* name); + + .export __sysremove + + .include "jumptab.inc" + .include "geossym.inc" + +__sysremove: + sta r0L + stx r0H + jsr DeleteFile + txa + ldx #0 + rts diff --git a/libsrc/geos-common/file/sysrename.s b/libsrc/geos-common/file/sysrename.s new file mode 100644 index 000000000..541c2cc60 --- /dev/null +++ b/libsrc/geos-common/file/sysrename.s @@ -0,0 +1,24 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 19.07.2005 + +; unsigned char __fastcall__ _sysrename (const char* oldname, const char* newname); + + .export __sysrename + .import popax + + .include "jumptab.inc" + .include "geossym.inc" + +__sysrename: + sta r0L + stx r0H + jsr popax + sta r6L + stx r6H + jsr RenameFile + txa + ldx #0 + rts diff --git a/libsrc/geos-common/file/updaterecordfile.s b/libsrc/geos-common/file/updaterecordfile.s new file mode 100644 index 000000000..b46440c6e --- /dev/null +++ b/libsrc/geos-common/file/updaterecordfile.s @@ -0,0 +1,16 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char UpdateRecordFile (void); + + .import setoserror + .export _UpdateRecordFile + + .include "jumptab.inc" + +_UpdateRecordFile: + jsr UpdateRecordFile + jmp setoserror diff --git a/libsrc/geos-common/file/writerecord.s b/libsrc/geos-common/file/writerecord.s new file mode 100644 index 000000000..13da13048 --- /dev/null +++ b/libsrc/geos-common/file/writerecord.s @@ -0,0 +1,22 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 25.12.1999, 2.1.2003 + +; char WriteRecord (char *buffer, int length); + + .export _WriteRecord + .import popax, setoserror + + .include "jumptab.inc" + .include "geossym.inc" + +_WriteRecord: + sta r2L + stx r2H + jsr popax + sta r7L + stx r7H + jsr WriteRecord + jmp setoserror