From: izydorst Date: Thu, 2 Jan 2003 01:50:39 +0000 (+0000) Subject: all functions returning char in A now have X cleared X-Git-Tag: V2.12.0~1806 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e6e35390d11c23fcd07f56922e0f2356b79a864b;p=cc65 all functions returning char in A now have X cleared git-svn-id: svn://svn.cc65.org/cc65/trunk@1868 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/doc/geos.sgml b/doc/geos.sgml index 0d1987a9d..32996d114 100644 --- a/doc/geos.sgml +++ b/doc/geos.sgml @@ -290,7 +290,7 @@ Draws single point on the screen, no matter what the current pattern is.

-This function tests if given pixel is set and returns true or false. +This function tests if given pixel is set and returns Character and string output @@ -624,6 +624,7 @@ GEOSLib function (if its type is For passing parameters use almost always pointer to your data e.g. This function compares string CopyFString and CmpFString

diff --git a/libsrc/geos/conio/where.s b/libsrc/geos/conio/where.s index fbe3bcebf..5690fa6d2 100644 --- a/libsrc/geos/conio/where.s +++ b/libsrc/geos/conio/where.s @@ -4,6 +4,7 @@ ; ; 27.10.2001 ; 06.03.2002 +; 02.01.2003 ; unsigned char wherex (void); ; unsigned char wherey (void); @@ -11,10 +12,10 @@ .export _wherex, _wherey .importzp cursor_c, cursor_r - .include "../inc/jumptab.inc" - _wherex: lda cursor_c + ldx #0 rts _wherey: lda cursor_r + ldx #0 rts diff --git a/libsrc/geos/devel/fio_module.s b/libsrc/geos/devel/fio_module.s index dca349712..d32f11569 100644 --- a/libsrc/geos/devel/fio_module.s +++ b/libsrc/geos/devel/fio_module.s @@ -57,6 +57,7 @@ _open: lda ptr1 ldx ptr1+1 jsr _FindFile ; try to find the file + tax bne @error lda dirEntryBuf + OFF_DE_TR_SC ; tr&se for ReadByte (r1) @@ -139,7 +140,7 @@ _read: bne @L2 inc ptr3+1 -@L2: txa ; was there error ? +@L2: lda __oserror ; was there error ? beq @L3 cmp #BFR_OVERFLOW ; EOF? bne @error diff --git a/libsrc/geos/devel/geos-tgi.s b/libsrc/geos/devel/geos-tgi.s index ed9a24f68..784d2834b 100644 --- a/libsrc/geos/devel/geos-tgi.s +++ b/libsrc/geos/devel/geos-tgi.s @@ -303,6 +303,8 @@ INIT: ; DONE: + jsr GETERROR ; clear error (if any) + lda #0 jsr SETVIEWPAGE ; switch into viewpage 0 @@ -434,6 +436,8 @@ SETCOLOR: ; SETPALETTE: + jsr GETERROR ; clear error (if any) + ldy #PALETTESIZE - 1 @L1: lda (ptr1),y ; Copy the palette and #$0F ; Make a valid color diff --git a/libsrc/geos/disk/Makefile b/libsrc/geos/disk/Makefile index 519dc0bfb..45fed6905 100644 --- a/libsrc/geos/disk/Makefile +++ b/libsrc/geos/disk/Makefile @@ -11,7 +11,7 @@ S_OBJS = blkalloc.o calcblksfree.o changediskdevice.o chkdkgeos.o enterturbo.o e findbambit.o freeblock.o getblock.o getdirhead.o getptrcurdknm.o newdisk.o\ nxtblkalloc.o opendisk.o purgeturbo.o putblock.o putdirhead.o readblock.o\ readbuff.o setnextfree.o setgeosdisk.o writeblock.o writebuff.o verwriteblock.o\ - gettrse.o\ + gettrse.o setoserror.o\ dio_openclose.o dio_cts.o dio_stc.o dio_read.o dio_write.o dio_writev.o\ dio_params.o diff --git a/libsrc/geos/disk/blkalloc.s b/libsrc/geos/disk/blkalloc.s index 64a665aba..7048400a0 100644 --- a/libsrc/geos/disk/blkalloc.s +++ b/libsrc/geos/disk/blkalloc.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char BlkAlloc (struct tr_se output[], int length); - .import popax, __oserror + .import popax, setoserror .export _BlkAlloc .include "../inc/jumptab.inc" @@ -19,6 +19,4 @@ _BlkAlloc: sta r4L stx r4H jsr BlkAlloc - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/changediskdevice.s b/libsrc/geos/disk/changediskdevice.s index 19fbd1c94..6d5aab070 100644 --- a/libsrc/geos/disk/changediskdevice.s +++ b/libsrc/geos/disk/changediskdevice.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char ChangeDiskDevice (char newDriveNumber); - .import __oserror + .import setoserror .export _ChangeDiskDevice .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _ChangeDiskDevice: jsr ChangeDiskDevice - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/chkdkgeos.s b/libsrc/geos/disk/chkdkgeos.s index 8a81d3f6d..52b7165d4 100644 --- a/libsrc/geos/disk/chkdkgeos.s +++ b/libsrc/geos/disk/chkdkgeos.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char ChkDkGEOS (void); - .import __oserror + .import setoserror .export _ChkDkGEOS .include "../inc/jumptab.inc" @@ -14,6 +14,6 @@ _ChkDkGEOS: jsr ChkDkGEOS - stx __oserror + jsr setoserror lda isGEOS rts diff --git a/libsrc/geos/disk/dio_write.s b/libsrc/geos/disk/dio_write.s index 836157b9f..9f522c2df 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, __oserror + .import dio_params, setoserror .export _dio_write .include "../inc/geossym.inc" .include "../inc/jumptab.inc" @@ -18,8 +18,6 @@ jsr dio_params jsr WriteBlock - stx __oserror - txa - rts + jmp setoserror .endproc diff --git a/libsrc/geos/disk/findbambit.s b/libsrc/geos/disk/findbambit.s index 66a689885..22f847be6 100644 --- a/libsrc/geos/disk/findbambit.s +++ b/libsrc/geos/disk/findbambit.s @@ -1,13 +1,14 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char FindBAMBit (struct tr_se *TS); ; (might be called inUSE (if (!inUSE(block)))) .import gettrse + .import return0, return1 .export _FindBAMBit .include "../inc/jumptab.inc" @@ -19,7 +20,5 @@ _FindBAMBit: stx r6H jsr FindBAMBit bne inUse - lda #0 - rts -inUse: lda #$ff - rts + jmp return0 +inUse: jmp return1 diff --git a/libsrc/geos/disk/freeblock.s b/libsrc/geos/disk/freeblock.s index effef0a84..63de4d05b 100644 --- a/libsrc/geos/disk/freeblock.s +++ b/libsrc/geos/disk/freeblock.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char FreeBlock (struct tr_se *TS); - .import gettrse, __oserror + .import gettrse, setoserror .export _FreeBlock .include "../inc/jumptab.inc" @@ -17,6 +17,4 @@ _FreeBlock: sta r6L stx r6H jsr FreeBlock - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/getblock.s b/libsrc/geos/disk/getblock.s index 2e6d40919..8d0d22810 100644 --- a/libsrc/geos/disk/getblock.s +++ b/libsrc/geos/disk/getblock.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char GetBlock (struct tr_se *myTS, char *buffer); - .import popax, __oserror + .import popax, setoserror .import gettrse .export _GetBlock @@ -21,6 +21,4 @@ _GetBlock: sta r1L stx r1H jsr GetBlock - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/getdirhead.s b/libsrc/geos/disk/getdirhead.s index 63fdcad7a..1794d1889 100644 --- a/libsrc/geos/disk/getdirhead.s +++ b/libsrc/geos/disk/getdirhead.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char GetDirHead (void); - .import __oserror + .import setoserror .export _GetDirHead .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" - + _GetDirHead: jsr GetDirHead - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/newdisk.s b/libsrc/geos/disk/newdisk.s index d0a23b1e4..60862a956 100644 --- a/libsrc/geos/disk/newdisk.s +++ b/libsrc/geos/disk/newdisk.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char NewDisk (void); - .import __oserror + .import setoserror .export _NewDisk .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _NewDisk: jsr NewDisk - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/nxtblkalloc.s b/libsrc/geos/disk/nxtblkalloc.s index 568c85393..620de7eb9 100644 --- a/libsrc/geos/disk/nxtblkalloc.s +++ b/libsrc/geos/disk/nxtblkalloc.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char NxtBlkAlloc (struct tr_se *startTS, struct tr_se output[], int length ); - .import popax, __oserror + .import popax, setoserror .import gettrse .importzp ptr4 .export _NxtBlkAlloc @@ -25,6 +25,4 @@ _NxtBlkAlloc: sta r3L stx r3H jsr NxtBlkAlloc - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/opendisk.s b/libsrc/geos/disk/opendisk.s index 254e028a0..88040c390 100644 --- a/libsrc/geos/disk/opendisk.s +++ b/libsrc/geos/disk/opendisk.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char OpenDisk (void); - .import __oserror + .import setoserror .export _OpenDisk .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _OpenDisk: jsr OpenDisk - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/putblock.s b/libsrc/geos/disk/putblock.s index d48446b42..122de9303 100644 --- a/libsrc/geos/disk/putblock.s +++ b/libsrc/geos/disk/putblock.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char PutBlock (struct tr_se *myTS, char *buffer); - .import popax, __oserror + .import popax, setoserror .import gettrse .export _PutBlock @@ -21,6 +21,4 @@ _PutBlock: sta r1L stx r1H jsr PutBlock - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/putdirhead.s b/libsrc/geos/disk/putdirhead.s index 71468305e..9b94020e6 100644 --- a/libsrc/geos/disk/putdirhead.s +++ b/libsrc/geos/disk/putdirhead.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.99, 2.1.2003 ; char PutDirHead (void); - .import __oserror + .import setoserror .export _PutDirHead .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _PutDirHead: jsr PutDirHead - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/readblock.s b/libsrc/geos/disk/readblock.s index 63f326bc7..d99a09b0d 100644 --- a/libsrc/geos/disk/readblock.s +++ b/libsrc/geos/disk/readblock.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char ReadBlock (struct tr_se myTS, char *buffer); - .import popax, __oserror + .import popax, setoserror .import gettrse .export _ReadBlock @@ -21,6 +21,4 @@ _ReadBlock: sta r1L stx r1H jsr ReadBlock - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/readbuff.s b/libsrc/geos/disk/readbuff.s index 0e945c48a..bbc13018e 100644 --- a/libsrc/geos/disk/readbuff.s +++ b/libsrc/geos/disk/readbuff.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 26.10.99 +; 26.10.1999, 2.1.2003 ; char ReadBuff (struct tr_se); - .import __oserror + .import setoserror .import gettrse .export _ReadBuff @@ -18,6 +18,4 @@ _ReadBuff: sta r1L stx r1H jsr ReadBuff - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/setgeosdisk.s b/libsrc/geos/disk/setgeosdisk.s index 92e0808d8..520cc8d39 100644 --- a/libsrc/geos/disk/setgeosdisk.s +++ b/libsrc/geos/disk/setgeosdisk.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char SetGEOSDisk (void); - .import __oserror + .import setoserror .export _SetGEOSDisk .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _SetGEOSDisk: jsr SetGEOSDisk - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/setoserror.s b/libsrc/geos/disk/setoserror.s new file mode 100644 index 000000000..382f56551 --- /dev/null +++ b/libsrc/geos/disk/setoserror.s @@ -0,0 +1,16 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 2.1.2003 +; + + .export setoserror + .import __oserror + +setoserror: + stx __oserror + txa + ldx #0 ; X is cleared (high byte for promoting char to int) + tay ; Y register is used just to save flags state + rts diff --git a/libsrc/geos/disk/verwriteblock.s b/libsrc/geos/disk/verwriteblock.s index 27ac611cb..5758fc53c 100644 --- a/libsrc/geos/disk/verwriteblock.s +++ b/libsrc/geos/disk/verwriteblock.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char VerWriteBlock (struct tr_se *myTS, char *buffer); - .import popax, __oserror + .import popax, setoserror .import gettrse .export _VerWriteBlock @@ -21,6 +21,4 @@ _VerWriteBlock: sta r1L stx r1H jsr VerWriteBlock - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/writeblock.s b/libsrc/geos/disk/writeblock.s index 591add7a9..63a7194c0 100644 --- a/libsrc/geos/disk/writeblock.s +++ b/libsrc/geos/disk/writeblock.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char WriteBlock (struct tr_se *myTS, char *buffer); - .import popax, __oserror + .import popax, setoserror .import gettrse .export _WriteBlock @@ -21,6 +21,4 @@ _WriteBlock: sta r1L stx r1H jsr WriteBlock - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/disk/writebuff.s b/libsrc/geos/disk/writebuff.s index 24a9c5ec1..96904ca0e 100644 --- a/libsrc/geos/disk/writebuff.s +++ b/libsrc/geos/disk/writebuff.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 26.10.99 +; 26.10.1999, 2.1.2003 ; char WriteBuff (struct tr_se*); - .import __oserror + .import setoserror .import gettrse .export _WriteBuff @@ -18,6 +18,4 @@ _WriteBuff: sta r1L stx r1H jsr WriteBuff - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/dlgbox/dodlgbox.s b/libsrc/geos/dlgbox/dodlgbox.s index b17a4f686..3e8629b16 100644 --- a/libsrc/geos/dlgbox/dodlgbox.s +++ b/libsrc/geos/dlgbox/dodlgbox.s @@ -1,8 +1,8 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char DoDlgBox (char *myParamString); @@ -15,5 +15,6 @@ _DoDlgBox: sta r0L stx r0H jsr DoDlgBox + ldx #0 lda r0L rts diff --git a/libsrc/geos/file/appendrecord.s b/libsrc/geos/file/appendrecord.s index 9fb12b0b9..9e2b2d85e 100644 --- a/libsrc/geos/file/appendrecord.s +++ b/libsrc/geos/file/appendrecord.s @@ -1,20 +1,17 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char AppendRecord (void); - .import __oserror + .import setoserror .export _AppendRecord .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _AppendRecord: jsr AppendRecord - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/closerecordfile.s b/libsrc/geos/file/closerecordfile.s index 9b7f4955f..abfd0e719 100644 --- a/libsrc/geos/file/closerecordfile.s +++ b/libsrc/geos/file/closerecordfile.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char CloseRecordFile (void); - .import __oserror + .import setoserror .export _CloseRecordFile .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _CloseRecordFile: jsr CloseRecordFile - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/deletefile.s b/libsrc/geos/file/deletefile.s index 900b47cd4..bc98b439b 100644 --- a/libsrc/geos/file/deletefile.s +++ b/libsrc/geos/file/deletefile.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char DeleteFile (char *myName); - .import __oserror + .import setoserror .export _DeleteFile .include "../inc/jumptab.inc" @@ -16,6 +16,4 @@ _DeleteFile: sta r0L stx r0H jsr DeleteFile - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/deleterecord.s b/libsrc/geos/file/deleterecord.s index e25c84b8a..aeaba7e05 100644 --- a/libsrc/geos/file/deleterecord.s +++ b/libsrc/geos/file/deleterecord.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char DeleteRecord (void); - .import __oserror + .import setoserror .export _DeleteRecord .include "../inc/jumptab.inc" @@ -14,6 +14,4 @@ _DeleteRecord: jsr DeleteRecord - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/findfile.s b/libsrc/geos/file/findfile.s index 1494f0ba8..1ed04a743 100644 --- a/libsrc/geos/file/findfile.s +++ b/libsrc/geos/file/findfile.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char FindFile (char *myName); - .import __oserror + .import setoserror .export _FindFile .include "../inc/jumptab.inc" @@ -16,6 +16,4 @@ _FindFile: sta r6L stx r6H jsr FindFile - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/findftypes.s b/libsrc/geos/file/findftypes.s index 6b5b260d4..bc5fcf3bd 100644 --- a/libsrc/geos/file/findftypes.s +++ b/libsrc/geos/file/findftypes.s @@ -2,12 +2,12 @@ ; ; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99, 30.7.2000 +; 25.12.1999, 2.1.2003 ; char FindFTypes (char *buffer, char fileType, char fileMax, char *Class); .export _FindFTypes - .import popax, popa, __oserror + .import popax, popa, setoserror .include "../inc/jumptab.inc" .include "../inc/geossym.inc" @@ -26,7 +26,7 @@ _FindFTypes: sta r6L stx r6H jsr FindFTypes - stx __oserror + jsr setoserror ; return (fileMax - r7H) lda tmpFileMax sec diff --git a/libsrc/geos/file/followchain.s b/libsrc/geos/file/followchain.s index efdb17a64..12fe6600d 100644 --- a/libsrc/geos/file/followchain.s +++ b/libsrc/geos/file/followchain.s @@ -1,13 +1,13 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char FollowChain (struct tr_se *myTrSe, char *buffer); .export _FollowChain - .import popax, __oserror + .import popax, setoserror .import gettrse .include "../inc/jumptab.inc" @@ -21,6 +21,4 @@ _FollowChain: sta r1L stx r1H jsr FollowChain - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/freefile.s b/libsrc/geos/file/freefile.s index 1df7287a1..4e2acd1c7 100644 --- a/libsrc/geos/file/freefile.s +++ b/libsrc/geos/file/freefile.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char FreeFile (struct trse myTrSe[]); - .import __oserror + .import setoserror .export _FreeFile .include "../inc/jumptab.inc" @@ -16,6 +16,4 @@ _FreeFile: sta r9L stx r9H jsr FreeFile - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/getfhdrinfo.s b/libsrc/geos/file/getfhdrinfo.s index aef9ebd09..03171f082 100644 --- a/libsrc/geos/file/getfhdrinfo.s +++ b/libsrc/geos/file/getfhdrinfo.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char GetFHdrInfo (struct filehandle *myFile); - .import __oserror + .import setoserror .export _GetFHdrInfo .include "../inc/jumptab.inc" @@ -16,6 +16,4 @@ _GetFHdrInfo: sta r9L stx r9H jsr GetFHdrInfo - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/insertrecord.s b/libsrc/geos/file/insertrecord.s index 2953ecad3..b27af3b97 100644 --- a/libsrc/geos/file/insertrecord.s +++ b/libsrc/geos/file/insertrecord.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char InsertRecord (void); - .import __oserror + .import setoserror .export _InsertRecord .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" - + _InsertRecord: jsr InsertRecord - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/nextrecord.s b/libsrc/geos/file/nextrecord.s index eec5a88fa..df3806a2f 100644 --- a/libsrc/geos/file/nextrecord.s +++ b/libsrc/geos/file/nextrecord.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char NextRecord (void); - .import __oserror + .import setoserror .export _NextRecord .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" - + _NextRecord: jsr NextRecord - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/openrecordfile.s b/libsrc/geos/file/openrecordfile.s index 218a01fcf..40f8497f9 100644 --- a/libsrc/geos/file/openrecordfile.s +++ b/libsrc/geos/file/openrecordfile.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char OpenRecordFile (char *myName); - .import __oserror + .import setoserror .export _OpenRecordFile .include "../inc/jumptab.inc" @@ -16,6 +16,4 @@ _OpenRecordFile: sta r0L stx r0H jsr OpenRecordFile - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/pointrecord.s b/libsrc/geos/file/pointrecord.s index b7d6d4aa5..3bf6dec60 100644 --- a/libsrc/geos/file/pointrecord.s +++ b/libsrc/geos/file/pointrecord.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char PointRecord (char recordNum); - .import __oserror + .import setoserror .export _PointRecord .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _PointRecord: jsr PointRecord - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/previousrecord.s b/libsrc/geos/file/previousrecord.s index f74ee8ba6..d535abf1a 100644 --- a/libsrc/geos/file/previousrecord.s +++ b/libsrc/geos/file/previousrecord.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char PreviousRecord (void); - .import __oserror + .import setoserror .export _PreviousRecord .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _PreviousRecord: jsr PreviousRecord - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/readbyte.s b/libsrc/geos/file/readbyte.s index 9995b848a..fe7c82aa6 100644 --- a/libsrc/geos/file/readbyte.s +++ b/libsrc/geos/file/readbyte.s @@ -1,8 +1,8 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char ReadByte (void); @@ -10,9 +10,9 @@ .export _ReadByte .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _ReadByte: jsr ReadByte stx __oserror + ldx #0 rts diff --git a/libsrc/geos/file/readfile.s b/libsrc/geos/file/readfile.s index 5136e4561..ac1cda404 100644 --- a/libsrc/geos/file/readfile.s +++ b/libsrc/geos/file/readfile.s @@ -1,13 +1,13 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char ReadFile (struct tr_se *myTS, char *buffer, int length); .export _ReadFile - .import popax, __oserror + .import popax, setoserror .import gettrse .include "../inc/jumptab.inc" @@ -24,6 +24,4 @@ _ReadFile: sta r1L stx r1H jsr ReadFile - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/readrecord.s b/libsrc/geos/file/readrecord.s index ec7d227b9..6b1a46d69 100644 --- a/libsrc/geos/file/readrecord.s +++ b/libsrc/geos/file/readrecord.s @@ -1,13 +1,13 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char ReadRecord (char *buffer, int length); .export _ReadRecord - .import popax, __oserror + .import popax, setoserror .include "../inc/jumptab.inc" .include "../inc/geossym.inc" @@ -19,6 +19,4 @@ _ReadRecord: sta r7L stx r7H jsr ReadRecord - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/renamefile.s b/libsrc/geos/file/renamefile.s index b0b835de5..24834603e 100644 --- a/libsrc/geos/file/renamefile.s +++ b/libsrc/geos/file/renamefile.s @@ -1,17 +1,17 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char RenameFile (char *source, char *target); .export _RenameFile - .import popax, __oserror + .import popax, setoserror .include "../inc/jumptab.inc" .include "../inc/geossym.inc" - + _RenameFile: sta r0L stx r0H @@ -19,6 +19,4 @@ _RenameFile: sta r6L stx r6H jsr RenameFile - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/savefile.s b/libsrc/geos/file/savefile.s index 520dbf3fb..85bc8c484 100644 --- a/libsrc/geos/file/savefile.s +++ b/libsrc/geos/file/savefile.s @@ -1,12 +1,12 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char SaveFile (struct fileheader *myHeader); - .import __oserror + .import setoserror .export _SaveFile .include "../inc/jumptab.inc" @@ -16,6 +16,4 @@ _SaveFile: sta r9L stx r9H jsr SaveFile - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/updaterecordfile.s b/libsrc/geos/file/updaterecordfile.s index 2338a9ab1..e395c4af9 100644 --- a/libsrc/geos/file/updaterecordfile.s +++ b/libsrc/geos/file/updaterecordfile.s @@ -1,19 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char UpdateRecordFile (void); - .import __oserror + .import setoserror .export _UpdateRecordFile .include "../inc/jumptab.inc" - .include "../inc/geossym.inc" _UpdateRecordFile: jsr UpdateRecordFile - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/file/writerecord.s b/libsrc/geos/file/writerecord.s index 7652abc53..1a6d08772 100644 --- a/libsrc/geos/file/writerecord.s +++ b/libsrc/geos/file/writerecord.s @@ -1,13 +1,13 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.1999, 2.1.2003 ; char WriteRecord (char *buffer, int length); .export _WriteRecord - .import popax, __oserror + .import popax, setoserror .include "../inc/jumptab.inc" .include "../inc/geossym.inc" @@ -19,6 +19,4 @@ _WriteRecord: sta r7L stx r7H jsr WriteRecord - stx __oserror - txa - rts + jmp setoserror diff --git a/libsrc/geos/graph/getcharwidth.s b/libsrc/geos/graph/getcharwidth.s index e0f08864b..82ffd1018 100644 --- a/libsrc/geos/graph/getcharwidth.s +++ b/libsrc/geos/graph/getcharwidth.s @@ -1,8 +1,8 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char GetCharWidth (char character); @@ -10,4 +10,7 @@ .include "../inc/jumptab.inc" -_GetCharWidth = GetCharWidth +_GetCharWidth: + jsr GetCharWidth + ldx #0 + rts diff --git a/libsrc/geos/graph/testpoint.s b/libsrc/geos/graph/testpoint.s index f068e77b5..6a502cc96 100644 --- a/libsrc/geos/graph/testpoint.s +++ b/libsrc/geos/graph/testpoint.s @@ -1,12 +1,13 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 29.10.99 +; 29.10.1999, 2.1.2003 ; char TestPoint (struct pixel *mypixel); .import PointRegs + .import return0, return1 .export _TestPoint .include "../inc/jumptab.inc" @@ -15,7 +16,5 @@ _TestPoint: jsr PointRegs jsr TestPoint bcc goFalse - lda #$ff - rts -goFalse: lda #0 - rts + jmp return1 +goFalse: jmp return0 diff --git a/libsrc/geos/memory/cmpstring.s b/libsrc/geos/memory/cmpstring.s index 8ebe70a51..1310de284 100644 --- a/libsrc/geos/memory/cmpstring.s +++ b/libsrc/geos/memory/cmpstring.s @@ -1,16 +1,20 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 22.12.99 +; 22.12.1999, 2.1.2003 ; char CmpString (char *dest, char* source); .import DoubleSPop + .import return0, return1 .export _CmpString .include "../inc/jumptab.inc" _CmpString: jsr DoubleSPop - jmp CmpString + jsr CmpString + bne L1 + jmp return0 +L1: jmp return1 diff --git a/libsrc/geos/memory/verifyram.s b/libsrc/geos/memory/verifyram.s index 0ff362371..ad2384f45 100644 --- a/libsrc/geos/memory/verifyram.s +++ b/libsrc/geos/memory/verifyram.s @@ -1,8 +1,8 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char VerifyRAM (char REUBank, int length, char *reuaddy, char *cpuaddy); @@ -16,4 +16,5 @@ _VerifyRAM: jsr REURegs jsr VerifyRAM txa + ldx #0 rts diff --git a/libsrc/geos/mousesprite/getnextchar.s b/libsrc/geos/mousesprite/getnextchar.s index 85cd9e043..fed9f8b08 100644 --- a/libsrc/geos/mousesprite/getnextchar.s +++ b/libsrc/geos/mousesprite/getnextchar.s @@ -1,8 +1,8 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char GetNextChar (void); ; note that if it returns 0 (FALSE) then no characters are available @@ -11,4 +11,8 @@ .include "../inc/jumptab.inc" -_GetNextChar = GetNextChar \ No newline at end of file +_GetNextChar: + jsr GetNextChar + ldx #0 + tay ; preserve Z flag + rts diff --git a/libsrc/geos/mousesprite/ismseinregion.s b/libsrc/geos/mousesprite/ismseinregion.s index 4d35fa8dd..dcdb1e86a 100644 --- a/libsrc/geos/mousesprite/ismseinregion.s +++ b/libsrc/geos/mousesprite/ismseinregion.s @@ -1,12 +1,13 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 21.12.99 +; 21.12.1999, 2.1.2003 ; char IsMseInRegion (struct window *mywindow); .import RectRegs + .import return0, return1 .export _IsMseInRegion @@ -14,4 +15,7 @@ _IsMseInRegion: jsr RectRegs - jmp IsMseInRegion + jsr IsMseInRegion + bne L1 + jmp return0 +L1: jmp return1 diff --git a/libsrc/geos/mousesprite/mouse.s b/libsrc/geos/mousesprite/mouse.s index f71b67b1f..263c9f832 100644 --- a/libsrc/geos/mousesprite/mouse.s +++ b/libsrc/geos/mousesprite/mouse.s @@ -51,6 +51,7 @@ _mse_storex: stx mouseRight+1 _mse_initend: lda #0 + tax ; -------------------------------------------------------------------------- ; ; void mouse_done (void); @@ -178,6 +179,7 @@ _mouse_move: ; _mouse_buttons: + ldx #0 lda pressFlag and #SET_MOUSE lsr diff --git a/libsrc/geos/system/get_ostype.s b/libsrc/geos/system/get_ostype.s index f92f634a9..264f80b3f 100644 --- a/libsrc/geos/system/get_ostype.s +++ b/libsrc/geos/system/get_ostype.s @@ -15,6 +15,7 @@ .include "../inc/geossym2.inc" get_ostype: + ldx #0 lda version and #%11110000 cmp #$10 @@ -50,5 +51,6 @@ ntsc: lda #$80 ; NTSC modeend: stx tmp1 ora tmp1 + ldx #0 plp ; restore interrupt state rts diff --git a/libsrc/geos/system/getrandom.s b/libsrc/geos/system/getrandom.s index c9245fd0f..9bb70f4d3 100644 --- a/libsrc/geos/system/getrandom.s +++ b/libsrc/geos/system/getrandom.s @@ -1,13 +1,16 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 30.10.99 +; 30.10.1999, 2.1.2003 -; int GetRandom (void); +; char GetRandom (void); .export _GetRandom .include "../inc/jumptab.inc" -_GetRandom = GetRandom +_GetRandom: + jsr GetRandom + ldx #0 + rts