From ebce3ebbc37d6e81da1726e00ffa21bbbac6816e Mon Sep 17 00:00:00 2001 From: izydorst Date: Wed, 4 Jul 2001 22:08:13 +0000 Subject: [PATCH] errno/oserrno stuff is cleaned up, saved some bytes in dialog box functions git-svn-id: svn://svn.cc65.org/cc65/trunk@775 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- include/geos/gsym.h | 3 --- libsrc/geos/Makefile | 4 ++-- libsrc/geos/disk/blkalloc.s | 4 ++-- libsrc/geos/disk/calcblksfree.s | 3 ++- libsrc/geos/disk/changediskdevice.s | 3 ++- libsrc/geos/disk/chkdkgeos.s | 3 ++- libsrc/geos/disk/dio_read.s | 4 ++-- libsrc/geos/disk/dio_write.s | 4 ++-- libsrc/geos/disk/dio_writev.s | 4 ++-- libsrc/geos/disk/freeblock.s | 4 ++-- libsrc/geos/disk/getblock.s | 4 ++-- libsrc/geos/disk/getdirhead.s | 3 ++- libsrc/geos/disk/getptrcurdknm.s | 3 ++- libsrc/geos/disk/newdisk.s | 3 ++- libsrc/geos/disk/nxtblkalloc.s | 4 ++-- libsrc/geos/disk/opendisk.s | 3 ++- libsrc/geos/disk/putblock.s | 4 ++-- libsrc/geos/disk/putdirhead.s | 3 ++- libsrc/geos/disk/readblock.s | 4 ++-- libsrc/geos/disk/readbuff.s | 3 ++- libsrc/geos/disk/setgeosdisk.s | 3 ++- libsrc/geos/disk/setnextfree.s | 3 ++- libsrc/geos/disk/verwriteblock.s | 4 ++-- libsrc/geos/disk/writeblock.s | 4 ++-- libsrc/geos/disk/writebuff.s | 3 ++- libsrc/geos/dlgbox/dlgboxfileselect.s | 13 ++----------- libsrc/geos/dlgbox/dlgboxgetstring.s | 11 +++-------- libsrc/geos/dlgbox/dlgboxok.s | 9 ++------- libsrc/geos/dlgbox/dlgboxokcancel.s | 9 ++------- libsrc/geos/dlgbox/dlgboxyesno.s | 9 ++------- libsrc/geos/file/appendrecord.s | 3 ++- libsrc/geos/file/closerecordfile.s | 3 ++- libsrc/geos/file/deletefile.s | 3 ++- libsrc/geos/file/deleterecord.s | 3 ++- libsrc/geos/file/findfile.s | 3 ++- libsrc/geos/file/findftypes.s | 4 ++-- libsrc/geos/file/followchain.s | 4 ++-- libsrc/geos/file/freefile.s | 3 ++- libsrc/geos/file/get1stdirentry.s | 3 ++- libsrc/geos/file/getfhdrinfo.s | 3 ++- libsrc/geos/file/getnxtdirentry.s | 3 ++- libsrc/geos/file/insertrecord.s | 3 ++- libsrc/geos/file/nextrecord.s | 3 ++- libsrc/geos/file/openrecordfile.s | 3 ++- libsrc/geos/file/pointrecord.s | 3 ++- libsrc/geos/file/previousrecord.s | 3 ++- libsrc/geos/file/readbyte.s | 3 ++- libsrc/geos/file/readfile.s | 4 ++-- libsrc/geos/file/readrecord.s | 4 ++-- libsrc/geos/file/renamefile.s | 4 ++-- libsrc/geos/file/savefile.s | 3 ++- libsrc/geos/file/updaterecordfile.s | 3 ++- libsrc/geos/file/writerecord.s | 4 ++-- libsrc/geos/inc/geossym.inc | 2 -- 54 files changed, 105 insertions(+), 110 deletions(-) diff --git a/include/geos/gsym.h b/include/geos/gsym.h index 1a2eecf54..b2c2da7e4 100644 --- a/include/geos/gsym.h +++ b/include/geos/gsym.h @@ -119,9 +119,6 @@ #define STATUS *(char*)0x90 #define curDevice *(char*)0xba -/* Here's my own errno location, I hope this won't confilct with anything... */ -#define errno *(char*)0x91 - #define irqvec *(unsigned int*)0x0314 #define bkvec *(unsigned int*)0x0316 #define nmivec *(unsigned int*)0x0318 diff --git a/libsrc/geos/Makefile b/libsrc/geos/Makefile index acf28e5c4..178c3d4f3 100644 --- a/libsrc/geos/Makefile +++ b/libsrc/geos/Makefile @@ -4,10 +4,10 @@ # # Maciej 'YTM/Elysium' Witkowiak -OBJ_DIRS=disk dlgbox file graph menuicon memory mousesprite process system +OBJ_DIRS=devel disk dlgbox file graph menuicon memory mousesprite process system all: - @for i in devel $(OBJ_DIRS); do $(MAKE) -C $$i; done + @for i in $(OBJ_DIRS); do $(MAKE) -C $$i; done @mv devel/crt0.o ../geos.o @for i in $(OBJ_DIRS); do $(AR) a ../geos.lib $$i/*.o; done diff --git a/libsrc/geos/disk/blkalloc.s b/libsrc/geos/disk/blkalloc.s index a8f0638eb..64a665aba 100644 --- a/libsrc/geos/disk/blkalloc.s +++ b/libsrc/geos/disk/blkalloc.s @@ -6,7 +6,7 @@ ; char BlkAlloc (struct tr_se output[], int length); - .import popax + .import popax, __oserror .export _BlkAlloc .include "../inc/jumptab.inc" @@ -19,6 +19,6 @@ _BlkAlloc: sta r4L stx r4H jsr BlkAlloc - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/calcblksfree.s b/libsrc/geos/disk/calcblksfree.s index 9e0247e34..2471138e5 100644 --- a/libsrc/geos/disk/calcblksfree.s +++ b/libsrc/geos/disk/calcblksfree.s @@ -6,6 +6,7 @@ ; int CalcBlksFree (void); + .import __oserror .export _CalcBlksFree .include "../inc/jumptab.inc" @@ -13,7 +14,7 @@ _CalcBlksFree: jsr CalcBlksFree - stx errno + stx __oserror lda r4L ldx r4H rts diff --git a/libsrc/geos/disk/changediskdevice.s b/libsrc/geos/disk/changediskdevice.s index 204b46076..19fbd1c94 100644 --- a/libsrc/geos/disk/changediskdevice.s +++ b/libsrc/geos/disk/changediskdevice.s @@ -6,6 +6,7 @@ ; char ChangeDiskDevice (char newDriveNumber); + .import __oserror .export _ChangeDiskDevice .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _ChangeDiskDevice: jsr ChangeDiskDevice - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/chkdkgeos.s b/libsrc/geos/disk/chkdkgeos.s index 01496076b..8a81d3f6d 100644 --- a/libsrc/geos/disk/chkdkgeos.s +++ b/libsrc/geos/disk/chkdkgeos.s @@ -6,6 +6,7 @@ ; char ChkDkGEOS (void); + .import __oserror .export _ChkDkGEOS .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _ChkDkGEOS: jsr ChkDkGEOS - stx errno + stx __oserror lda isGEOS rts diff --git a/libsrc/geos/disk/dio_read.s b/libsrc/geos/disk/dio_read.s index 757009016..896cc27a5 100644 --- a/libsrc/geos/disk/dio_read.s +++ b/libsrc/geos/disk/dio_read.s @@ -9,7 +9,7 @@ ; sectnum_t - 16bit ; - .import dio_params + .import dio_params, __oserror .export _dio_read .include "../inc/geossym.inc" .include "../inc/jumptab.inc" @@ -18,7 +18,7 @@ jsr dio_params jsr ReadBlock - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/dio_write.s b/libsrc/geos/disk/dio_write.s index 1a6d679b8..836157b9f 100644 --- a/libsrc/geos/disk/dio_write.s +++ b/libsrc/geos/disk/dio_write.s @@ -9,7 +9,7 @@ ; sectnum_t - 16bit ; - .import dio_params + .import dio_params, __oserror .export _dio_write .include "../inc/geossym.inc" .include "../inc/jumptab.inc" @@ -18,7 +18,7 @@ jsr dio_params jsr WriteBlock - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/dio_writev.s b/libsrc/geos/disk/dio_writev.s index 2885629a5..1f4ca7766 100644 --- a/libsrc/geos/disk/dio_writev.s +++ b/libsrc/geos/disk/dio_writev.s @@ -9,7 +9,7 @@ ; sectnum_t - 16bit ; - .import dio_params + .import dio_params, __oserror .export _dio_write_verify .include "../inc/geossym.inc" .include "../inc/jumptab.inc" @@ -18,7 +18,7 @@ jsr dio_params jsr VerWriteBlock - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/freeblock.s b/libsrc/geos/disk/freeblock.s index 57b84b781..effef0a84 100644 --- a/libsrc/geos/disk/freeblock.s +++ b/libsrc/geos/disk/freeblock.s @@ -6,7 +6,7 @@ ; char FreeBlock (struct tr_se *TS); - .import gettrse + .import gettrse, __oserror .export _FreeBlock .include "../inc/jumptab.inc" @@ -17,6 +17,6 @@ _FreeBlock: sta r6L stx r6H jsr FreeBlock - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/getblock.s b/libsrc/geos/disk/getblock.s index 2ba5f3fa5..2e6d40919 100644 --- a/libsrc/geos/disk/getblock.s +++ b/libsrc/geos/disk/getblock.s @@ -6,7 +6,7 @@ ; char GetBlock (struct tr_se *myTS, char *buffer); - .import popax + .import popax, __oserror .import gettrse .export _GetBlock @@ -21,6 +21,6 @@ _GetBlock: sta r1L stx r1H jsr GetBlock - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/getdirhead.s b/libsrc/geos/disk/getdirhead.s index e3a452237..63fdcad7a 100644 --- a/libsrc/geos/disk/getdirhead.s +++ b/libsrc/geos/disk/getdirhead.s @@ -6,6 +6,7 @@ ; char GetDirHead (void); + .import __oserror .export _GetDirHead .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _GetDirHead: jsr GetDirHead - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/getptrcurdknm.s b/libsrc/geos/disk/getptrcurdknm.s index c36068c2d..dd8fecbd3 100644 --- a/libsrc/geos/disk/getptrcurdknm.s +++ b/libsrc/geos/disk/getptrcurdknm.s @@ -8,6 +8,7 @@ ; (fills curName[17] with current disk's name) .importzp ptr4, ptr3 + .import __oserror .export _GetPtrCurDkNm .include "../inc/jumptab.inc" @@ -30,5 +31,5 @@ namelp: lda (ptr4),y bne namelp fin: lda #0 sta (ptr3),y - stx errno + stx __oserror rts diff --git a/libsrc/geos/disk/newdisk.s b/libsrc/geos/disk/newdisk.s index 7a539c016..d0a23b1e4 100644 --- a/libsrc/geos/disk/newdisk.s +++ b/libsrc/geos/disk/newdisk.s @@ -6,6 +6,7 @@ ; char NewDisk (void); + .import __oserror .export _NewDisk .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _NewDisk: jsr NewDisk - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/nxtblkalloc.s b/libsrc/geos/disk/nxtblkalloc.s index 8bab0e47a..568c85393 100644 --- a/libsrc/geos/disk/nxtblkalloc.s +++ b/libsrc/geos/disk/nxtblkalloc.s @@ -6,7 +6,7 @@ ; char NxtBlkAlloc (struct tr_se *startTS, struct tr_se output[], int length ); - .import popax + .import popax, __oserror .import gettrse .importzp ptr4 .export _NxtBlkAlloc @@ -25,6 +25,6 @@ _NxtBlkAlloc: sta r3L stx r3H jsr NxtBlkAlloc - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/opendisk.s b/libsrc/geos/disk/opendisk.s index 7f0c83d4a..254e028a0 100644 --- a/libsrc/geos/disk/opendisk.s +++ b/libsrc/geos/disk/opendisk.s @@ -6,6 +6,7 @@ ; char OpenDisk (void); + .import __oserror .export _OpenDisk .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _OpenDisk: jsr OpenDisk - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/putblock.s b/libsrc/geos/disk/putblock.s index c857bf768..d48446b42 100644 --- a/libsrc/geos/disk/putblock.s +++ b/libsrc/geos/disk/putblock.s @@ -6,7 +6,7 @@ ; char PutBlock (struct tr_se *myTS, char *buffer); - .import popax + .import popax, __oserror .import gettrse .export _PutBlock @@ -21,6 +21,6 @@ _PutBlock: sta r1L stx r1H jsr PutBlock - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/putdirhead.s b/libsrc/geos/disk/putdirhead.s index 24577865f..71468305e 100644 --- a/libsrc/geos/disk/putdirhead.s +++ b/libsrc/geos/disk/putdirhead.s @@ -6,6 +6,7 @@ ; char PutDirHead (void); + .import __oserror .export _PutDirHead .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _PutDirHead: jsr PutDirHead - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/readblock.s b/libsrc/geos/disk/readblock.s index 5c319e2ce..63f326bc7 100644 --- a/libsrc/geos/disk/readblock.s +++ b/libsrc/geos/disk/readblock.s @@ -6,7 +6,7 @@ ; char ReadBlock (struct tr_se myTS, char *buffer); - .import popax + .import popax, __oserror .import gettrse .export _ReadBlock @@ -21,6 +21,6 @@ _ReadBlock: sta r1L stx r1H jsr ReadBlock - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/readbuff.s b/libsrc/geos/disk/readbuff.s index 4d6cda0a9..0e945c48a 100644 --- a/libsrc/geos/disk/readbuff.s +++ b/libsrc/geos/disk/readbuff.s @@ -6,6 +6,7 @@ ; char ReadBuff (struct tr_se); + .import __oserror .import gettrse .export _ReadBuff @@ -17,6 +18,6 @@ _ReadBuff: sta r1L stx r1H jsr ReadBuff - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/setgeosdisk.s b/libsrc/geos/disk/setgeosdisk.s index cf1f32713..92e0808d8 100644 --- a/libsrc/geos/disk/setgeosdisk.s +++ b/libsrc/geos/disk/setgeosdisk.s @@ -6,6 +6,7 @@ ; char SetGEOSDisk (void); + .import __oserror .export _SetGEOSDisk .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _SetGEOSDisk: jsr SetGEOSDisk - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/setnextfree.s b/libsrc/geos/disk/setnextfree.s index df698b1b9..fecc8f1e0 100644 --- a/libsrc/geos/disk/setnextfree.s +++ b/libsrc/geos/disk/setnextfree.s @@ -6,6 +6,7 @@ ; struct tr_se SetNextFree (struct tr_se *startTS); + .import __oserror .import gettrse .export _SetNextFree @@ -17,7 +18,7 @@ _SetNextFree: sta r3L stx r3H jsr SetNextFree - stx errno + stx __oserror lda r3L ldx r3H rts diff --git a/libsrc/geos/disk/verwriteblock.s b/libsrc/geos/disk/verwriteblock.s index 88601eef6..27ac611cb 100644 --- a/libsrc/geos/disk/verwriteblock.s +++ b/libsrc/geos/disk/verwriteblock.s @@ -6,7 +6,7 @@ ; char VerWriteBlock (struct tr_se *myTS, char *buffer); - .import popax + .import popax, __oserror .import gettrse .export _VerWriteBlock @@ -21,6 +21,6 @@ _VerWriteBlock: sta r1L stx r1H jsr VerWriteBlock - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/writeblock.s b/libsrc/geos/disk/writeblock.s index 4574f2f9f..591add7a9 100644 --- a/libsrc/geos/disk/writeblock.s +++ b/libsrc/geos/disk/writeblock.s @@ -6,7 +6,7 @@ ; char WriteBlock (struct tr_se *myTS, char *buffer); - .import popax + .import popax, __oserror .import gettrse .export _WriteBlock @@ -21,6 +21,6 @@ _WriteBlock: sta r1L stx r1H jsr WriteBlock - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/disk/writebuff.s b/libsrc/geos/disk/writebuff.s index ecd04bc5b..24a9c5ec1 100644 --- a/libsrc/geos/disk/writebuff.s +++ b/libsrc/geos/disk/writebuff.s @@ -6,6 +6,7 @@ ; char WriteBuff (struct tr_se*); + .import __oserror .import gettrse .export _WriteBuff @@ -17,6 +18,6 @@ _WriteBuff: sta r1L stx r1H jsr WriteBuff - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/dlgbox/dlgboxfileselect.s b/libsrc/geos/dlgbox/dlgboxfileselect.s index 8efc44772..ac4548959 100644 --- a/libsrc/geos/dlgbox/dlgboxfileselect.s +++ b/libsrc/geos/dlgbox/dlgboxfileselect.s @@ -8,6 +8,7 @@ .export _DlgBoxFileSelect .import popa, popax + .import _DoDlgBox .include "../inc/jumptab.inc" .include "../inc/geossym.inc" @@ -15,13 +16,6 @@ .include "../inc/geosmac.ca65.inc" _DlgBoxFileSelect: -; sta r5L -; stx r5H -; jsr popa -; sta r7L -; jsr popax -; sta r10L -; stx r10H sta tmp_r5 stx tmp_r5+1 @@ -38,10 +32,7 @@ DB_FS_reload: lda #paramStrFileSelect - sta r0L - stx r0H - jsr DoDlgBox - lda r0L + jsr _DoDlgBox cmp #DISK bne DB_FS_Fin jsr OpenDisk diff --git a/libsrc/geos/dlgbox/dlgboxgetstring.s b/libsrc/geos/dlgbox/dlgboxgetstring.s index 8398bd7e3..68471ea3f 100644 --- a/libsrc/geos/dlgbox/dlgboxgetstring.s +++ b/libsrc/geos/dlgbox/dlgboxgetstring.s @@ -7,11 +7,10 @@ ; char DlgBoxGetString (char *string, char strlen, char *line1,char *line2); .export _DlgBoxGetString - .import DB_get2lines + .import DB_get2lines, _DoDlgBox .importzp ptr2, ptr3, ptr4 .import popa, popax - - .include "../inc/jumptab.inc" + .include "../inc/geossym.inc" .include "../inc/const.inc" @@ -24,11 +23,7 @@ _DlgBoxGetString: stx ptr2+1 lda #paramStrGetString - sta r0L - stx r0H - jsr DoDlgBox - lda r0L - rts + jmp _DoDlgBox paramStrGetString: .byte DEF_DB_POS | 1 diff --git a/libsrc/geos/dlgbox/dlgboxok.s b/libsrc/geos/dlgbox/dlgboxok.s index 8b9b96197..17872744a 100644 --- a/libsrc/geos/dlgbox/dlgboxok.s +++ b/libsrc/geos/dlgbox/dlgboxok.s @@ -7,10 +7,9 @@ ; char DlgBoxOk (char *line1,char *line2); .export _DlgBoxOk - .import DB_get2lines + .import DB_get2lines, _DoDlgBox .importzp ptr3, ptr4 - .include "../inc/jumptab.inc" .include "../inc/geossym.inc" .include "../inc/const.inc" @@ -18,11 +17,7 @@ _DlgBoxOk: jsr DB_get2lines lda #paramStrOk - sta r0L - stx r0H - jsr DoDlgBox - lda r0L - rts + jmp _DoDlgBox paramStrOk: .byte DEF_DB_POS | 1 diff --git a/libsrc/geos/dlgbox/dlgboxokcancel.s b/libsrc/geos/dlgbox/dlgboxokcancel.s index 14a4e936e..76316f0c4 100644 --- a/libsrc/geos/dlgbox/dlgboxokcancel.s +++ b/libsrc/geos/dlgbox/dlgboxokcancel.s @@ -7,10 +7,9 @@ ; char DlgBoxOkCancel (char *line1,char *line2); .export _DlgBoxOkCancel - .import DB_get2lines + .import DB_get2lines, _DoDlgBox .importzp ptr3, ptr4 - .include "../inc/jumptab.inc" .include "../inc/geossym.inc" .include "../inc/const.inc" @@ -18,11 +17,7 @@ _DlgBoxOkCancel: jsr DB_get2lines lda #paramStrOkCancel - sta r0L - stx r0H - jsr DoDlgBox - lda r0L - rts + jmp _DoDlgBox paramStrOkCancel: .byte DEF_DB_POS | 1 diff --git a/libsrc/geos/dlgbox/dlgboxyesno.s b/libsrc/geos/dlgbox/dlgboxyesno.s index 7c1d934d0..d378094f6 100644 --- a/libsrc/geos/dlgbox/dlgboxyesno.s +++ b/libsrc/geos/dlgbox/dlgboxyesno.s @@ -7,10 +7,9 @@ ; char DlgBoxYesNo (char *line1,char *line2); .export _DlgBoxYesNo - .import DB_get2lines + .import DB_get2lines, _DoDlgBox .importzp ptr3, ptr4 - .include "../inc/jumptab.inc" .include "../inc/geossym.inc" .include "../inc/const.inc" @@ -18,11 +17,7 @@ _DlgBoxYesNo: jsr DB_get2lines lda #paramStrYesNo - sta r0L - stx r0H - jsr DoDlgBox - lda r0L - rts + jmp _DoDlgBox paramStrYesNo: .byte DEF_DB_POS | 1 diff --git a/libsrc/geos/file/appendrecord.s b/libsrc/geos/file/appendrecord.s index 243fdf27f..9fb12b0b9 100644 --- a/libsrc/geos/file/appendrecord.s +++ b/libsrc/geos/file/appendrecord.s @@ -6,6 +6,7 @@ ; char AppendRecord (void); + .import __oserror .export _AppendRecord .include "../inc/jumptab.inc" @@ -14,6 +15,6 @@ _AppendRecord: jsr AppendRecord - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/closerecordfile.s b/libsrc/geos/file/closerecordfile.s index b8454d065..9b7f4955f 100644 --- a/libsrc/geos/file/closerecordfile.s +++ b/libsrc/geos/file/closerecordfile.s @@ -6,6 +6,7 @@ ; char CloseRecordFile (void); + .import __oserror .export _CloseRecordFile .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _CloseRecordFile: jsr CloseRecordFile - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/deletefile.s b/libsrc/geos/file/deletefile.s index 919e55e32..900b47cd4 100644 --- a/libsrc/geos/file/deletefile.s +++ b/libsrc/geos/file/deletefile.s @@ -6,6 +6,7 @@ ; char DeleteFile (char *myName); + .import __oserror .export _DeleteFile .include "../inc/jumptab.inc" @@ -15,6 +16,6 @@ _DeleteFile: sta r0L stx r0H jsr DeleteFile - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/deleterecord.s b/libsrc/geos/file/deleterecord.s index 8691b6aa1..e25c84b8a 100644 --- a/libsrc/geos/file/deleterecord.s +++ b/libsrc/geos/file/deleterecord.s @@ -6,6 +6,7 @@ ; char DeleteRecord (void); + .import __oserror .export _DeleteRecord .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _DeleteRecord: jsr DeleteRecord - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/findfile.s b/libsrc/geos/file/findfile.s index 65008d69b..1494f0ba8 100644 --- a/libsrc/geos/file/findfile.s +++ b/libsrc/geos/file/findfile.s @@ -6,6 +6,7 @@ ; char FindFile (char *myName); + .import __oserror .export _FindFile .include "../inc/jumptab.inc" @@ -15,6 +16,6 @@ _FindFile: sta r6L stx r6H jsr FindFile - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/findftypes.s b/libsrc/geos/file/findftypes.s index b15c3d4d1..8c020985d 100644 --- a/libsrc/geos/file/findftypes.s +++ b/libsrc/geos/file/findftypes.s @@ -7,7 +7,7 @@ ; char FindFTypes (char *buffer, char fileType, char fileMax, char *Class); .export _FindFTypes - .import popax, popa + .import popax, popa, __oserror .include "../inc/jumptab.inc" .include "../inc/geossym.inc" @@ -24,7 +24,7 @@ _FindFTypes: sta r6L stx r6H jsr FindFTypes - stx errno + stx __oserror ; return (fileMax - r7H) lda tmpFileMax sec diff --git a/libsrc/geos/file/followchain.s b/libsrc/geos/file/followchain.s index a76d9c6ea..efdb17a64 100644 --- a/libsrc/geos/file/followchain.s +++ b/libsrc/geos/file/followchain.s @@ -7,7 +7,7 @@ ; char FollowChain (struct tr_se *myTrSe, char *buffer); .export _FollowChain - .import popax + .import popax, __oserror .import gettrse .include "../inc/jumptab.inc" @@ -21,6 +21,6 @@ _FollowChain: sta r1L stx r1H jsr FollowChain - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/freefile.s b/libsrc/geos/file/freefile.s index dd02d28e9..1df7287a1 100644 --- a/libsrc/geos/file/freefile.s +++ b/libsrc/geos/file/freefile.s @@ -6,6 +6,7 @@ ; char FreeFile (struct trse myTrSe[]); + .import __oserror .export _FreeFile .include "../inc/jumptab.inc" @@ -15,6 +16,6 @@ _FreeFile: sta r9L stx r9H jsr FreeFile - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/get1stdirentry.s b/libsrc/geos/file/get1stdirentry.s index 7542c7dc1..79db1fb7a 100644 --- a/libsrc/geos/file/get1stdirentry.s +++ b/libsrc/geos/file/get1stdirentry.s @@ -6,6 +6,7 @@ ; struct filehandle* Get1stDirEntry (void); + .import __oserror .export _Get1stDirEntry .include "../inc/diskdrv.inc" @@ -13,7 +14,7 @@ _Get1stDirEntry: jsr Get1stDirEntry - stx errno + stx __oserror lda r5L ldx r5H rts diff --git a/libsrc/geos/file/getfhdrinfo.s b/libsrc/geos/file/getfhdrinfo.s index 815a70767..aef9ebd09 100644 --- a/libsrc/geos/file/getfhdrinfo.s +++ b/libsrc/geos/file/getfhdrinfo.s @@ -6,6 +6,7 @@ ; char GetFHdrInfo (struct filehandle *myFile); + .import __oserror .export _GetFHdrInfo .include "../inc/jumptab.inc" @@ -15,6 +16,6 @@ _GetFHdrInfo: sta r9L stx r9H jsr GetFHdrInfo - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/getnxtdirentry.s b/libsrc/geos/file/getnxtdirentry.s index d67f3fc1f..bf20bf696 100644 --- a/libsrc/geos/file/getnxtdirentry.s +++ b/libsrc/geos/file/getnxtdirentry.s @@ -6,6 +6,7 @@ ; struct filehandle* GetNxtDirEntry (void); + .import __oserror .export _GetNxtDirEntry .include "../inc/diskdrv.inc" @@ -13,7 +14,7 @@ _GetNxtDirEntry: jsr GetNxtDirEntry - stx errno + stx __oserror lda r5L ldx r5H rts diff --git a/libsrc/geos/file/insertrecord.s b/libsrc/geos/file/insertrecord.s index 5b94de9e8..2953ecad3 100644 --- a/libsrc/geos/file/insertrecord.s +++ b/libsrc/geos/file/insertrecord.s @@ -6,6 +6,7 @@ ; char InsertRecord (void); + .import __oserror .export _InsertRecord .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _InsertRecord: jsr InsertRecord - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/nextrecord.s b/libsrc/geos/file/nextrecord.s index 473806ea4..eec5a88fa 100644 --- a/libsrc/geos/file/nextrecord.s +++ b/libsrc/geos/file/nextrecord.s @@ -6,6 +6,7 @@ ; char NextRecord (void); + .import __oserror .export _NextRecord .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _NextRecord: jsr NextRecord - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/openrecordfile.s b/libsrc/geos/file/openrecordfile.s index 9251e6745..218a01fcf 100644 --- a/libsrc/geos/file/openrecordfile.s +++ b/libsrc/geos/file/openrecordfile.s @@ -6,6 +6,7 @@ ; char OpenRecordFile (char *myName); + .import __oserror .export _OpenRecordFile .include "../inc/jumptab.inc" @@ -15,6 +16,6 @@ _OpenRecordFile: sta r0L stx r0H jsr OpenRecordFile - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/pointrecord.s b/libsrc/geos/file/pointrecord.s index bfd5b8b46..b7d6d4aa5 100644 --- a/libsrc/geos/file/pointrecord.s +++ b/libsrc/geos/file/pointrecord.s @@ -6,6 +6,7 @@ ; char PointRecord (char recordNum); + .import __oserror .export _PointRecord .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _PointRecord: jsr PointRecord - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/previousrecord.s b/libsrc/geos/file/previousrecord.s index 2c84ba5ba..f74ee8ba6 100644 --- a/libsrc/geos/file/previousrecord.s +++ b/libsrc/geos/file/previousrecord.s @@ -6,6 +6,7 @@ ; char PreviousRecord (void); + .import __oserror .export _PreviousRecord .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _PreviousRecord: jsr PreviousRecord - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/readbyte.s b/libsrc/geos/file/readbyte.s index e618ebf40..9995b848a 100644 --- a/libsrc/geos/file/readbyte.s +++ b/libsrc/geos/file/readbyte.s @@ -6,6 +6,7 @@ ; char ReadByte (void); + .import __oserror .export _ReadByte .include "../inc/jumptab.inc" @@ -13,5 +14,5 @@ _ReadByte: jsr ReadByte - stx errno + stx __oserror rts diff --git a/libsrc/geos/file/readfile.s b/libsrc/geos/file/readfile.s index 333d096c3..5136e4561 100644 --- a/libsrc/geos/file/readfile.s +++ b/libsrc/geos/file/readfile.s @@ -7,7 +7,7 @@ ; char ReadFile (struct tr_se *myTS, char *buffer, int length); .export _ReadFile - .import popax + .import popax, __oserror .import gettrse .include "../inc/jumptab.inc" @@ -24,6 +24,6 @@ _ReadFile: sta r1L stx r1H jsr ReadFile - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/readrecord.s b/libsrc/geos/file/readrecord.s index 4ccda9b71..ec7d227b9 100644 --- a/libsrc/geos/file/readrecord.s +++ b/libsrc/geos/file/readrecord.s @@ -7,7 +7,7 @@ ; char ReadRecord (char *buffer, int length); .export _ReadRecord - .import popax + .import popax, __oserror .include "../inc/jumptab.inc" .include "../inc/geossym.inc" @@ -19,6 +19,6 @@ _ReadRecord: sta r7L stx r7H jsr ReadRecord - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/renamefile.s b/libsrc/geos/file/renamefile.s index dfa885598..b0b835de5 100644 --- a/libsrc/geos/file/renamefile.s +++ b/libsrc/geos/file/renamefile.s @@ -7,7 +7,7 @@ ; char RenameFile (char *source, char *target); .export _RenameFile - .import popax + .import popax, __oserror .include "../inc/jumptab.inc" .include "../inc/geossym.inc" @@ -19,6 +19,6 @@ _RenameFile: sta r6L stx r6H jsr RenameFile - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/savefile.s b/libsrc/geos/file/savefile.s index e0f360833..520dbf3fb 100644 --- a/libsrc/geos/file/savefile.s +++ b/libsrc/geos/file/savefile.s @@ -6,6 +6,7 @@ ; char SaveFile (struct fileheader *myHeader); + .import __oserror .export _SaveFile .include "../inc/jumptab.inc" @@ -15,6 +16,6 @@ _SaveFile: sta r9L stx r9H jsr SaveFile - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/updaterecordfile.s b/libsrc/geos/file/updaterecordfile.s index 996002203..2338a9ab1 100644 --- a/libsrc/geos/file/updaterecordfile.s +++ b/libsrc/geos/file/updaterecordfile.s @@ -6,6 +6,7 @@ ; char UpdateRecordFile (void); + .import __oserror .export _UpdateRecordFile .include "../inc/jumptab.inc" @@ -13,6 +14,6 @@ _UpdateRecordFile: jsr UpdateRecordFile - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/file/writerecord.s b/libsrc/geos/file/writerecord.s index 7f59482ce..7652abc53 100644 --- a/libsrc/geos/file/writerecord.s +++ b/libsrc/geos/file/writerecord.s @@ -7,7 +7,7 @@ ; char WriteRecord (char *buffer, int length); .export _WriteRecord - .import popax + .import popax, __oserror .include "../inc/jumptab.inc" .include "../inc/geossym.inc" @@ -19,6 +19,6 @@ _WriteRecord: sta r7L stx r7H jsr WriteRecord - stx errno + stx __oserror txa rts diff --git a/libsrc/geos/inc/geossym.inc b/libsrc/geos/inc/geossym.inc index 0dc1e56ba..e558a4ae0 100644 --- a/libsrc/geos/inc/geossym.inc +++ b/libsrc/geos/inc/geossym.inc @@ -120,8 +120,6 @@ TURBO_DD00_CPY = $8f ; from 1541 turbo STATUS = $90 curDevice = $ba ; -errno = $91 ; custom error return code -; irqvec = $0314 bkvec = $0316 nmivec = $0318 -- 2.39.5