#--------------------------------------------------------------------------
# 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
+++ /dev/null
-
-;
-; 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
#--------------------------------------------------------------------------
# Directories
-DIRS = dlgbox
+DIRS = dlgbox \
+ file
#--------------------------------------------------------------------------
# Directives
--- /dev/null
+#
+# 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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
--- /dev/null
+
+;
+; 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