]> git.sur5r.net Git - cc65/commitdiff
errno/oserrno stuff is cleaned up, saved some bytes in dialog box functions
authorizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 4 Jul 2001 22:08:13 +0000 (22:08 +0000)
committerizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 4 Jul 2001 22:08:13 +0000 (22:08 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@775 b7a2c559-68d2-44c3-8de9-860c34a00d81

54 files changed:
include/geos/gsym.h
libsrc/geos/Makefile
libsrc/geos/disk/blkalloc.s
libsrc/geos/disk/calcblksfree.s
libsrc/geos/disk/changediskdevice.s
libsrc/geos/disk/chkdkgeos.s
libsrc/geos/disk/dio_read.s
libsrc/geos/disk/dio_write.s
libsrc/geos/disk/dio_writev.s
libsrc/geos/disk/freeblock.s
libsrc/geos/disk/getblock.s
libsrc/geos/disk/getdirhead.s
libsrc/geos/disk/getptrcurdknm.s
libsrc/geos/disk/newdisk.s
libsrc/geos/disk/nxtblkalloc.s
libsrc/geos/disk/opendisk.s
libsrc/geos/disk/putblock.s
libsrc/geos/disk/putdirhead.s
libsrc/geos/disk/readblock.s
libsrc/geos/disk/readbuff.s
libsrc/geos/disk/setgeosdisk.s
libsrc/geos/disk/setnextfree.s
libsrc/geos/disk/verwriteblock.s
libsrc/geos/disk/writeblock.s
libsrc/geos/disk/writebuff.s
libsrc/geos/dlgbox/dlgboxfileselect.s
libsrc/geos/dlgbox/dlgboxgetstring.s
libsrc/geos/dlgbox/dlgboxok.s
libsrc/geos/dlgbox/dlgboxokcancel.s
libsrc/geos/dlgbox/dlgboxyesno.s
libsrc/geos/file/appendrecord.s
libsrc/geos/file/closerecordfile.s
libsrc/geos/file/deletefile.s
libsrc/geos/file/deleterecord.s
libsrc/geos/file/findfile.s
libsrc/geos/file/findftypes.s
libsrc/geos/file/followchain.s
libsrc/geos/file/freefile.s
libsrc/geos/file/get1stdirentry.s
libsrc/geos/file/getfhdrinfo.s
libsrc/geos/file/getnxtdirentry.s
libsrc/geos/file/insertrecord.s
libsrc/geos/file/nextrecord.s
libsrc/geos/file/openrecordfile.s
libsrc/geos/file/pointrecord.s
libsrc/geos/file/previousrecord.s
libsrc/geos/file/readbyte.s
libsrc/geos/file/readfile.s
libsrc/geos/file/readrecord.s
libsrc/geos/file/renamefile.s
libsrc/geos/file/savefile.s
libsrc/geos/file/updaterecordfile.s
libsrc/geos/file/writerecord.s
libsrc/geos/inc/geossym.inc

index 1a2eecf54fa10bd7dd22bb792cac4d467cfbb90c..b2c2da7e40d2ef2c47c06d30514345a4a11e41b9 100644 (file)
 #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
index acf28e5c4493d0a255dea46dca9a786e0098916d..178c3d4f33d1d11e03891eb5d280258e9b477be0 100644 (file)
@@ -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
 
index a8f0638eb21f8195fc1454bcec21080db06f8809..64a665aba5cba73563fd0851162f45176ee67a01 100644 (file)
@@ -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
index 9e0247e34d8fc4a718b2ce4ae6f328e31592a54b..2471138e5cf5ce8a499a6c68d52ffb0a61894a32 100644 (file)
@@ -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
index 204b46076a89df89fa6871b7a6683f16d8cae5b2..19fbd1c94787b0a613d98556c253bbeab55ba038 100644 (file)
@@ -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
index 01496076b6785978e01cae19c54455f61bf38e3b..8a81d3f6db5f7ed5e3fd2e4489560f6b1f217837 100644 (file)
@@ -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
index 757009016fced38a765b7713910b94084ec27239..896cc27a597eea9e4a820a3fa0414f1314f9402c 100644 (file)
@@ -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
 
index 1a6d679b8b8ada7430c620d4591de499cb70f6d5..836157b9fbcc98e117938457ffa42c4832a54e4a 100644 (file)
@@ -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
 
index 2885629a54d11c14d3192f78e3c11f02eaf676c1..1f4ca7766407bb438d4ce47b0193eacc648bf2de 100644 (file)
@@ -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
 
index 57b84b781358fc038d6db8ee89b9d61eb4d502fd..effef0a849453131d71f786d270109028713d0bc 100644 (file)
@@ -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
index 2ba5f3fa5dff0facf3bbe6759f12f04497f6bec1..2e6d409195db4e6c8dd7e2d03597bed456b1c0d0 100644 (file)
@@ -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
index e3a452237aca95f88d736ada44e251437275f030..63fdcad7a398e5de9736d5585a1b250debbcf20d 100644 (file)
@@ -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
index c36068c2da75199b591bad8e7e4b94e92ceba6f7..dd8fecbd3712ce184ea38e41c7850dd70ef46fda 100644 (file)
@@ -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
index 7a539c016c5e2f83b5b527a2933704c15684cd55..d0a23b1e4e6360ad7baadd6e56a164349d84c24e 100644 (file)
@@ -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
index 8bab0e47ab6edaad702fa0976829c8928004cba7..568c85393339a5b6211dda8362f2a882e64a8351 100644 (file)
@@ -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
index 7f0c83d4a44e2c2d33ade59fbdd0bcafdb82734c..254e028a0176fe75ec01ad1c19483ed4458b8c33 100644 (file)
@@ -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
index c857bf768eb2e47fcd628ed11154dba6f1ab0c3f..d48446b422067223661c649eac3a6f54a823959a 100644 (file)
@@ -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
index 24577865f147dbfe8aa7c89d64f0b9d248e4c8ab..71468305e565cf4cbe93ca4890f9c4a1d49de18c 100644 (file)
@@ -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
index 5c319e2cec9c98aa6a7fd72dead1e948c251ca1b..63f326bc7f8982d7e58db0d2b344598f457b5401 100644 (file)
@@ -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
index 4d6cda0a9e189191d7f9785b41d254f67c060fba..0e945c48ac5bb553c31b899fea3bbc3a292c2c5f 100644 (file)
@@ -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
index cf1f327130b1a1d7e0adf154de6e4034fa7a406d..92e0808d8637d87a2b46368c9dc2f0e9481bfca7 100644 (file)
@@ -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
index df698b1b9cd0cff30035c7b8442b65e18afc16a6..fecc8f1e09ef1cc7121bffeeeb8fa694a8d32121 100644 (file)
@@ -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
index 88601eef6297e9b25fbf881497b8104e8ef805d1..27ac611cbc56dd41a8b21c83c164686e6947fb2d 100644 (file)
@@ -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
index 4574f2f9face042b86a90540e4a7e9e3489db957..591add7a925002966501ab40d3e2b6c7cea17c2e 100644 (file)
@@ -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
index ecd04bc5b6bbf5011dfeb69303ea7b03f887bbed..24a9c5ec13db9d7f5ccfae17e2e04854fce2a3c1 100644 (file)
@@ -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
index 8efc4477272b941914175f8262441de7c688fd47..ac4548959aeb833b26b8b1d609de6019d04d28c1 100644 (file)
@@ -8,6 +8,7 @@
 
                .export _DlgBoxFileSelect
                .import popa, popax
+               .import _DoDlgBox
 
                .include "../inc/jumptab.inc"
                .include "../inc/geossym.inc"
                .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
                ldx #>paramStrFileSelect
-               sta r0L
-               stx r0H
-               jsr DoDlgBox
-               lda r0L
+               jsr _DoDlgBox
                cmp #DISK
                bne DB_FS_Fin
                jsr OpenDisk
index 8398bd7e3ae82d1a0c7403c897995811ea062425..68471ea3fec1fd1a70dba90f6b7c93a8d5a8b5e5 100644 (file)
@@ -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
            ldx #>paramStrGetString
-           sta r0L
-           stx r0H
-           jsr DoDlgBox
-           lda r0L
-           rts
+           jmp _DoDlgBox
 
 paramStrGetString:
            .byte DEF_DB_POS | 1
index 8b9b96197a5fc229b438a66bc7a6d22b8fefd915..17872744a4e4ea3c8e83a887cd6aadc8ed2c5efc 100644 (file)
@@ -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
            ldx #>paramStrOk
-           sta r0L
-           stx r0H
-           jsr DoDlgBox
-           lda r0L
-           rts
+           jmp _DoDlgBox
 
 paramStrOk:
            .byte DEF_DB_POS | 1
index 14a4e936e0dfb1914761b630f183381c97431874..76316f0c4db9b4df47c903e7f27138841f6cd6d1 100644 (file)
@@ -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
            ldx #>paramStrOkCancel
-           sta r0L
-           stx r0H
-           jsr DoDlgBox
-           lda r0L
-           rts
+           jmp _DoDlgBox
 
 paramStrOkCancel:
            .byte DEF_DB_POS | 1
index 7c1d934d0da39aadabb9f95a182c19de6b0869e1..d378094f68b754907e4a46fc93f4c766e219fb00 100644 (file)
@@ -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
            ldx #>paramStrYesNo
-           sta r0L
-           stx r0H
-           jsr DoDlgBox
-           lda r0L
-           rts
+           jmp _DoDlgBox
 
 paramStrYesNo:
            .byte DEF_DB_POS | 1
index 243fdf27f5d1d077ca3a55ca99e16b8f5e6c4fa9..9fb12b0b95c72bcce7d3c911459c030fb7982705 100644 (file)
@@ -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
index b8454d0659a2093db4f752918ca87a7939795a4a..9b7f4955f967fb4d41b6657d9a7048df1044352c 100644 (file)
@@ -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
index 919e55e329d3172c70d6d2962d939dc31dd8dfaf..900b47cd4fb295795bfb2c19b87bcdbe4e79b3bb 100644 (file)
@@ -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
index 8691b6aa10ce15d00af2a76b229e882e92881c57..e25c84b8a44701a5e64e5418c9e72f409508bc3f 100644 (file)
@@ -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
index 65008d69b89db1ebc491c09e44527f82faf00240..1494f0ba815258c349c87ef9e2c57770635ad399 100644 (file)
@@ -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
index b15c3d4d11d93b6b5a7c287102463be64a36bc3f..8c020985dd91ab6b1bf457109d2de3c9448f5dba 100644 (file)
@@ -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
index a76d9c6ead542e672b549b6793517824827a5288..efdb17a640420656a021ffee297f8af373fbc1af 100644 (file)
@@ -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
index dd02d28e9d17cb724858062d463c122c98bbfa9c..1df7287a153e27eb6ae1856df2532a4a0134f8c6 100644 (file)
@@ -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
index 7542c7dc1214d1cb29c32dec73cbdd363ed94600..79db1fb7a876edf8b713a05d0bfb9d3767546aff 100644 (file)
@@ -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
index 815a70767deefd90c397a846a1585738dd465ec8..aef9ebd0963f119e15387fc58ddac47d9f1b66c3 100644 (file)
@@ -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
index d67f3fc1f904ac10553ceff58aaad9662801fa9c..bf20bf696753d12c8f8da5e2cd958ef631dd9904 100644 (file)
@@ -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
index 5b94de9e8f643e01d00cd4d061e491f7ef46e2d8..2953ecad3e3a5136fc09b35242ab77e9e50b46a3 100644 (file)
@@ -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
index 473806ea4e81e7789ace18a3865d375c2e4d55d9..eec5a88faa3a6d97516b47737b3b9e103b73638b 100644 (file)
@@ -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
index 9251e67458c4815587365e37a6aeee631f507770..218a01fcf770cf6a1233a8d08d4868862c4f5497 100644 (file)
@@ -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
index bfd5b8b4601c4f2ac08a57db788e58375a908599..b7d6d4aa5ea6f01676164a366c757f6c9b81a59b 100644 (file)
@@ -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
index 2c84ba5baeeb095353bf535c4cf35470959d092e..f74ee8ba67faaba5532e5a3081670171edea792e 100644 (file)
@@ -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
index e618ebf4062514a1296f236bc75f33158f1774f2..9995b848a9546cddbc3e071f8b8a7f5104c05de3 100644 (file)
@@ -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
index 333d096c362b50bb69c448fd9a3ed854d1407e77..5136e4561e5f8d3b411a52431373c24eb000cf48 100644 (file)
@@ -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
index 4ccda9b71b7965491f451a4685fef091052137ec..ec7d227b9bafaf95df3e0582e60ad17b4dba34bc 100644 (file)
@@ -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
index dfa88559844fbf2688b0de49516d34c64cdc7b33..b0b835de5c416f3f11b8343f2e80ade691505fe7 100644 (file)
@@ -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
index e0f36083394a58483905e79ee4e248a2321a8734..520dbf3fba4991578d6953234592bdebd5dacf22 100644 (file)
@@ -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
index 9960022034629da39c85f611870d3040d07f1c81..2338a9ab1a07e766bf501dfcd4ff0f7e03ad774a 100644 (file)
@@ -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
index 7f59482ced9647506f9ed83fabe79a8fb3057488..7652abc53918a2a90e8fd18ed18623bb618b110d 100644 (file)
@@ -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
index 0dc1e56ba565eb30f13b00f9c7373cfd343f0828..e558a4ae003b600c6b24b24b90fd34cd69ddf12a 100644 (file)
@@ -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