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
This commit is contained in:
izydorst 2003-01-02 01:50:39 +00:00
parent 38dcb86552
commit e6e35390d1
56 changed files with 239 additions and 279 deletions

View file

@ -290,7 +290,7 @@ Draws single point on the screen, no matter what the current pattern is.
<p> <p>
<tt/char TestPoint (struct pixel *myPixel)/ <tt/char TestPoint (struct pixel *myPixel)/
<p> <p>
This function tests if given pixel is set and returns true or false. This function tests if given pixel is set and returns <tt/true/ (non-zero) or <tt/false/ (zero).
<sect2>Character and string output <sect2>Character and string output
@ -624,6 +624,7 @@ GEOSLib function (if its type is <tt/char/), but in all cases last error is save
location. If it is nonzero - an error occured. See <tt/gdisk.h/ for the list of possible errorcodes. location. If it is nonzero - an error occured. See <tt/gdisk.h/ for the list of possible errorcodes.
You need to include <tt/errno.h/ to get <tt/__oserror/, together with standard <tt/errno/. The You need to include <tt/errno.h/ to get <tt/__oserror/, together with standard <tt/errno/. The
latter gives less verbose, but still usable information and can be used with <tt/strerror/. latter gives less verbose, but still usable information and can be used with <tt/strerror/.
Probably you will get more information using <tt/stroserror/ in similar way.
<p> <p>
For passing parameters use almost always pointer to your data e.g. <tt/ReadBuff (&amp;myTrSe)/. For passing parameters use almost always pointer to your data e.g. <tt/ReadBuff (&amp;myTrSe)/.
@ -1038,7 +1039,7 @@ is also copied.
<tt/char CmpString (char *s1, char *s2)/ <tt/char CmpString (char *s1, char *s2)/
<p> <p>
This function compares string <tt/s1/ to <tt/s2/ for equality - this is case sensitive, and both This function compares string <tt/s1/ to <tt/s2/ for equality - this is case sensitive, and both
strings have to have the same length. It returns either <tt/true/ or <tt/false/. strings have to have the same length. It returns either <tt/true/ (non-zero) or <tt/false/ (zero).
<sect2>CopyFString and CmpFString <sect2>CopyFString and CmpFString
<p> <p>

View file

@ -4,6 +4,7 @@
; ;
; 27.10.2001 ; 27.10.2001
; 06.03.2002 ; 06.03.2002
; 02.01.2003
; unsigned char wherex (void); ; unsigned char wherex (void);
; unsigned char wherey (void); ; unsigned char wherey (void);
@ -11,10 +12,10 @@
.export _wherex, _wherey .export _wherex, _wherey
.importzp cursor_c, cursor_r .importzp cursor_c, cursor_r
.include "../inc/jumptab.inc"
_wherex: lda cursor_c _wherex: lda cursor_c
ldx #0
rts rts
_wherey: lda cursor_r _wherey: lda cursor_r
ldx #0
rts rts

View file

@ -57,6 +57,7 @@ _open:
lda ptr1 lda ptr1
ldx ptr1+1 ldx ptr1+1
jsr _FindFile ; try to find the file jsr _FindFile ; try to find the file
tax
bne @error bne @error
lda dirEntryBuf + OFF_DE_TR_SC ; tr&se for ReadByte (r1) lda dirEntryBuf + OFF_DE_TR_SC ; tr&se for ReadByte (r1)
@ -139,7 +140,7 @@ _read:
bne @L2 bne @L2
inc ptr3+1 inc ptr3+1
@L2: txa ; was there error ? @L2: lda __oserror ; was there error ?
beq @L3 beq @L3
cmp #BFR_OVERFLOW ; EOF? cmp #BFR_OVERFLOW ; EOF?
bne @error bne @error

View file

@ -303,6 +303,8 @@ INIT:
; ;
DONE: DONE:
jsr GETERROR ; clear error (if any)
lda #0 lda #0
jsr SETVIEWPAGE ; switch into viewpage 0 jsr SETVIEWPAGE ; switch into viewpage 0
@ -434,6 +436,8 @@ SETCOLOR:
; ;
SETPALETTE: SETPALETTE:
jsr GETERROR ; clear error (if any)
ldy #PALETTESIZE - 1 ldy #PALETTESIZE - 1
@L1: lda (ptr1),y ; Copy the palette @L1: lda (ptr1),y ; Copy the palette
and #$0F ; Make a valid color and #$0F ; Make a valid color

View file

@ -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\ findbambit.o freeblock.o getblock.o getdirhead.o getptrcurdknm.o newdisk.o\
nxtblkalloc.o opendisk.o purgeturbo.o putblock.o putdirhead.o readblock.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\ 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_openclose.o dio_cts.o dio_stc.o dio_read.o dio_write.o dio_writev.o\
dio_params.o dio_params.o

View file

@ -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); ; char BlkAlloc (struct tr_se output[], int length);
.import popax, __oserror .import popax, setoserror
.export _BlkAlloc .export _BlkAlloc
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -19,6 +19,4 @@ _BlkAlloc:
sta r4L sta r4L
stx r4H stx r4H
jsr BlkAlloc jsr BlkAlloc
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char ChangeDiskDevice (char newDriveNumber);
.import __oserror .import setoserror
.export _ChangeDiskDevice .export _ChangeDiskDevice
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_ChangeDiskDevice: _ChangeDiskDevice:
jsr ChangeDiskDevice jsr ChangeDiskDevice
stx __oserror jmp setoserror
txa
rts

View file

@ -1,12 +1,12 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 21.12.99 ; 21.12.1999, 2.1.2003
; char ChkDkGEOS (void); ; char ChkDkGEOS (void);
.import __oserror .import setoserror
.export _ChkDkGEOS .export _ChkDkGEOS
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -14,6 +14,6 @@
_ChkDkGEOS: _ChkDkGEOS:
jsr ChkDkGEOS jsr ChkDkGEOS
stx __oserror jsr setoserror
lda isGEOS lda isGEOS
rts rts

View file

@ -9,7 +9,7 @@
; sectnum_t - 16bit ; sectnum_t - 16bit
; ;
.import dio_params, __oserror .import dio_params, setoserror
.export _dio_write .export _dio_write
.include "../inc/geossym.inc" .include "../inc/geossym.inc"
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -18,8 +18,6 @@
jsr dio_params jsr dio_params
jsr WriteBlock jsr WriteBlock
stx __oserror jmp setoserror
txa
rts
.endproc .endproc

View file

@ -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); ; char FindBAMBit (struct tr_se *TS);
; (might be called inUSE (if (!inUSE(block)))) ; (might be called inUSE (if (!inUSE(block))))
.import gettrse .import gettrse
.import return0, return1
.export _FindBAMBit .export _FindBAMBit
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -19,7 +20,5 @@ _FindBAMBit:
stx r6H stx r6H
jsr FindBAMBit jsr FindBAMBit
bne inUse bne inUse
lda #0 jmp return0
rts inUse: jmp return1
inUse: lda #$ff
rts

View file

@ -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); ; char FreeBlock (struct tr_se *TS);
.import gettrse, __oserror .import gettrse, setoserror
.export _FreeBlock .export _FreeBlock
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -17,6 +17,4 @@ _FreeBlock:
sta r6L sta r6L
stx r6H stx r6H
jsr FreeBlock jsr FreeBlock
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char GetBlock (struct tr_se *myTS, char *buffer);
.import popax, __oserror .import popax, setoserror
.import gettrse .import gettrse
.export _GetBlock .export _GetBlock
@ -21,6 +21,4 @@ _GetBlock:
sta r1L sta r1L
stx r1H stx r1H
jsr GetBlock jsr GetBlock
stx __oserror jmp setoserror
txa
rts

View file

@ -1,19 +1,16 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 21.12.99 ; 21.12.1999, 2.1.2003
; char GetDirHead (void); ; char GetDirHead (void);
.import __oserror .import setoserror
.export _GetDirHead .export _GetDirHead
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_GetDirHead: _GetDirHead:
jsr GetDirHead jsr GetDirHead
stx __oserror jmp setoserror
txa
rts

View file

@ -1,19 +1,16 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 21.12.99 ; 21.12.1999, 2.1.2003
; char NewDisk (void); ; char NewDisk (void);
.import __oserror .import setoserror
.export _NewDisk .export _NewDisk
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_NewDisk: _NewDisk:
jsr NewDisk jsr NewDisk
stx __oserror jmp setoserror
txa
rts

View file

@ -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 ); ; char NxtBlkAlloc (struct tr_se *startTS, struct tr_se output[], int length );
.import popax, __oserror .import popax, setoserror
.import gettrse .import gettrse
.importzp ptr4 .importzp ptr4
.export _NxtBlkAlloc .export _NxtBlkAlloc
@ -25,6 +25,4 @@ _NxtBlkAlloc:
sta r3L sta r3L
stx r3H stx r3H
jsr NxtBlkAlloc jsr NxtBlkAlloc
stx __oserror jmp setoserror
txa
rts

View file

@ -1,19 +1,16 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 21.12.99 ; 21.12.1999, 2.1.2003
; char OpenDisk (void); ; char OpenDisk (void);
.import __oserror .import setoserror
.export _OpenDisk .export _OpenDisk
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_OpenDisk: _OpenDisk:
jsr OpenDisk jsr OpenDisk
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char PutBlock (struct tr_se *myTS, char *buffer);
.import popax, __oserror .import popax, setoserror
.import gettrse .import gettrse
.export _PutBlock .export _PutBlock
@ -21,6 +21,4 @@ _PutBlock:
sta r1L sta r1L
stx r1H stx r1H
jsr PutBlock jsr PutBlock
stx __oserror jmp setoserror
txa
rts

View file

@ -1,19 +1,16 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 21.12.99 ; 21.12.99, 2.1.2003
; char PutDirHead (void); ; char PutDirHead (void);
.import __oserror .import setoserror
.export _PutDirHead .export _PutDirHead
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_PutDirHead: _PutDirHead:
jsr PutDirHead jsr PutDirHead
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char ReadBlock (struct tr_se myTS, char *buffer);
.import popax, __oserror .import popax, setoserror
.import gettrse .import gettrse
.export _ReadBlock .export _ReadBlock
@ -21,6 +21,4 @@ _ReadBlock:
sta r1L sta r1L
stx r1H stx r1H
jsr ReadBlock jsr ReadBlock
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char ReadBuff (struct tr_se);
.import __oserror .import setoserror
.import gettrse .import gettrse
.export _ReadBuff .export _ReadBuff
@ -18,6 +18,4 @@ _ReadBuff:
sta r1L sta r1L
stx r1H stx r1H
jsr ReadBuff jsr ReadBuff
stx __oserror jmp setoserror
txa
rts

View file

@ -1,19 +1,16 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 21.12.99 ; 21.12.1999, 2.1.2003
; char SetGEOSDisk (void); ; char SetGEOSDisk (void);
.import __oserror .import setoserror
.export _SetGEOSDisk .export _SetGEOSDisk
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_SetGEOSDisk: _SetGEOSDisk:
jsr SetGEOSDisk jsr SetGEOSDisk
stx __oserror jmp setoserror
txa
rts

View file

@ -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

View file

@ -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); ; char VerWriteBlock (struct tr_se *myTS, char *buffer);
.import popax, __oserror .import popax, setoserror
.import gettrse .import gettrse
.export _VerWriteBlock .export _VerWriteBlock
@ -21,6 +21,4 @@ _VerWriteBlock:
sta r1L sta r1L
stx r1H stx r1H
jsr VerWriteBlock jsr VerWriteBlock
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char WriteBlock (struct tr_se *myTS, char *buffer);
.import popax, __oserror .import popax, setoserror
.import gettrse .import gettrse
.export _WriteBlock .export _WriteBlock
@ -21,6 +21,4 @@ _WriteBlock:
sta r1L sta r1L
stx r1H stx r1H
jsr WriteBlock jsr WriteBlock
stx __oserror jmp setoserror
txa
rts

View file

@ -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*); ; char WriteBuff (struct tr_se*);
.import __oserror .import setoserror
.import gettrse .import gettrse
.export _WriteBuff .export _WriteBuff
@ -18,6 +18,4 @@ _WriteBuff:
sta r1L sta r1L
stx r1H stx r1H
jsr WriteBuff jsr WriteBuff
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char DoDlgBox (char *myParamString);
@ -15,5 +15,6 @@ _DoDlgBox:
sta r0L sta r0L
stx r0H stx r0H
jsr DoDlgBox jsr DoDlgBox
ldx #0
lda r0L lda r0L
rts rts

View file

@ -1,20 +1,17 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 25.12.99 ; 25.12.1999, 2.1.2003
; char AppendRecord (void); ; char AppendRecord (void);
.import __oserror .import setoserror
.export _AppendRecord .export _AppendRecord
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_AppendRecord: _AppendRecord:
jsr AppendRecord jsr AppendRecord
stx __oserror jmp setoserror
txa
rts

View file

@ -1,19 +1,16 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 25.12.99 ; 25.12.1999, 2.1.2003
; char CloseRecordFile (void); ; char CloseRecordFile (void);
.import __oserror .import setoserror
.export _CloseRecordFile .export _CloseRecordFile
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_CloseRecordFile: _CloseRecordFile:
jsr CloseRecordFile jsr CloseRecordFile
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char DeleteFile (char *myName);
.import __oserror .import setoserror
.export _DeleteFile .export _DeleteFile
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -16,6 +16,4 @@ _DeleteFile:
sta r0L sta r0L
stx r0H stx r0H
jsr DeleteFile jsr DeleteFile
stx __oserror jmp setoserror
txa
rts

View file

@ -1,12 +1,12 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 25.12.99 ; 25.12.1999, 2.1.2003
; char DeleteRecord (void); ; char DeleteRecord (void);
.import __oserror .import setoserror
.export _DeleteRecord .export _DeleteRecord
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -14,6 +14,4 @@
_DeleteRecord: _DeleteRecord:
jsr DeleteRecord jsr DeleteRecord
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char FindFile (char *myName);
.import __oserror .import setoserror
.export _FindFile .export _FindFile
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -16,6 +16,4 @@ _FindFile:
sta r6L sta r6L
stx r6H stx r6H
jsr FindFile jsr FindFile
stx __oserror jmp setoserror
txa
rts

View file

@ -2,12 +2,12 @@
; ;
; Maciej 'YTM/Elysium' Witkowiak ; 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); ; char FindFTypes (char *buffer, char fileType, char fileMax, char *Class);
.export _FindFTypes .export _FindFTypes
.import popax, popa, __oserror .import popax, popa, setoserror
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc" .include "../inc/geossym.inc"
@ -26,7 +26,7 @@ _FindFTypes:
sta r6L sta r6L
stx r6H stx r6H
jsr FindFTypes jsr FindFTypes
stx __oserror jsr setoserror
; return (fileMax - r7H) ; return (fileMax - r7H)
lda tmpFileMax lda tmpFileMax
sec sec

View file

@ -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); ; char FollowChain (struct tr_se *myTrSe, char *buffer);
.export _FollowChain .export _FollowChain
.import popax, __oserror .import popax, setoserror
.import gettrse .import gettrse
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -21,6 +21,4 @@ _FollowChain:
sta r1L sta r1L
stx r1H stx r1H
jsr FollowChain jsr FollowChain
stx __oserror jmp setoserror
txa
rts

View file

@ -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[]); ; char FreeFile (struct trse myTrSe[]);
.import __oserror .import setoserror
.export _FreeFile .export _FreeFile
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -16,6 +16,4 @@ _FreeFile:
sta r9L sta r9L
stx r9H stx r9H
jsr FreeFile jsr FreeFile
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char GetFHdrInfo (struct filehandle *myFile);
.import __oserror .import setoserror
.export _GetFHdrInfo .export _GetFHdrInfo
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -16,6 +16,4 @@ _GetFHdrInfo:
sta r9L sta r9L
stx r9H stx r9H
jsr GetFHdrInfo jsr GetFHdrInfo
stx __oserror jmp setoserror
txa
rts

View file

@ -1,19 +1,16 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 25.12.99 ; 25.12.1999, 2.1.2003
; char InsertRecord (void); ; char InsertRecord (void);
.import __oserror .import setoserror
.export _InsertRecord .export _InsertRecord
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_InsertRecord: _InsertRecord:
jsr InsertRecord jsr InsertRecord
stx __oserror jmp setoserror
txa
rts

View file

@ -1,19 +1,16 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 25.12.99 ; 25.12.1999, 2.1.2003
; char NextRecord (void); ; char NextRecord (void);
.import __oserror .import setoserror
.export _NextRecord .export _NextRecord
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_NextRecord: _NextRecord:
jsr NextRecord jsr NextRecord
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char OpenRecordFile (char *myName);
.import __oserror .import setoserror
.export _OpenRecordFile .export _OpenRecordFile
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -16,6 +16,4 @@ _OpenRecordFile:
sta r0L sta r0L
stx r0H stx r0H
jsr OpenRecordFile jsr OpenRecordFile
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char PointRecord (char recordNum);
.import __oserror .import setoserror
.export _PointRecord .export _PointRecord
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_PointRecord: _PointRecord:
jsr PointRecord jsr PointRecord
stx __oserror jmp setoserror
txa
rts

View file

@ -1,19 +1,16 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 25.12.99 ; 25.12.1999, 2.1.2003
; char PreviousRecord (void); ; char PreviousRecord (void);
.import __oserror .import setoserror
.export _PreviousRecord .export _PreviousRecord
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_PreviousRecord: _PreviousRecord:
jsr PreviousRecord jsr PreviousRecord
stx __oserror jmp setoserror
txa
rts

View file

@ -1,8 +1,8 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 25.12.99 ; 25.12.1999, 2.1.2003
; char ReadByte (void); ; char ReadByte (void);
@ -10,9 +10,9 @@
.export _ReadByte .export _ReadByte
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_ReadByte: _ReadByte:
jsr ReadByte jsr ReadByte
stx __oserror stx __oserror
ldx #0
rts rts

View file

@ -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); ; char ReadFile (struct tr_se *myTS, char *buffer, int length);
.export _ReadFile .export _ReadFile
.import popax, __oserror .import popax, setoserror
.import gettrse .import gettrse
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -24,6 +24,4 @@ _ReadFile:
sta r1L sta r1L
stx r1H stx r1H
jsr ReadFile jsr ReadFile
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char ReadRecord (char *buffer, int length);
.export _ReadRecord .export _ReadRecord
.import popax, __oserror .import popax, setoserror
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc" .include "../inc/geossym.inc"
@ -19,6 +19,4 @@ _ReadRecord:
sta r7L sta r7L
stx r7H stx r7H
jsr ReadRecord jsr ReadRecord
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char RenameFile (char *source, char *target);
.export _RenameFile .export _RenameFile
.import popax, __oserror .import popax, setoserror
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc" .include "../inc/geossym.inc"
_RenameFile: _RenameFile:
sta r0L sta r0L
stx r0H stx r0H
@ -19,6 +19,4 @@ _RenameFile:
sta r6L sta r6L
stx r6H stx r6H
jsr RenameFile jsr RenameFile
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char SaveFile (struct fileheader *myHeader);
.import __oserror .import setoserror
.export _SaveFile .export _SaveFile
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -16,6 +16,4 @@ _SaveFile:
sta r9L sta r9L
stx r9H stx r9H
jsr SaveFile jsr SaveFile
stx __oserror jmp setoserror
txa
rts

View file

@ -1,19 +1,16 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 25.12.99 ; 25.12.1999, 2.1.2003
; char UpdateRecordFile (void); ; char UpdateRecordFile (void);
.import __oserror .import setoserror
.export _UpdateRecordFile .export _UpdateRecordFile
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
_UpdateRecordFile: _UpdateRecordFile:
jsr UpdateRecordFile jsr UpdateRecordFile
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char WriteRecord (char *buffer, int length);
.export _WriteRecord .export _WriteRecord
.import popax, __oserror .import popax, setoserror
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
.include "../inc/geossym.inc" .include "../inc/geossym.inc"
@ -19,6 +19,4 @@ _WriteRecord:
sta r7L sta r7L
stx r7H stx r7H
jsr WriteRecord jsr WriteRecord
stx __oserror jmp setoserror
txa
rts

View file

@ -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); ; char GetCharWidth (char character);
@ -10,4 +10,7 @@
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
_GetCharWidth = GetCharWidth _GetCharWidth:
jsr GetCharWidth
ldx #0
rts

View file

@ -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); ; char TestPoint (struct pixel *mypixel);
.import PointRegs .import PointRegs
.import return0, return1
.export _TestPoint .export _TestPoint
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
@ -15,7 +16,5 @@ _TestPoint:
jsr PointRegs jsr PointRegs
jsr TestPoint jsr TestPoint
bcc goFalse bcc goFalse
lda #$ff jmp return1
rts goFalse: jmp return0
goFalse: lda #0
rts

View file

@ -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); ; char CmpString (char *dest, char* source);
.import DoubleSPop .import DoubleSPop
.import return0, return1
.export _CmpString .export _CmpString
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
_CmpString: _CmpString:
jsr DoubleSPop jsr DoubleSPop
jmp CmpString jsr CmpString
bne L1
jmp return0
L1: jmp return1

View file

@ -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); ; char VerifyRAM (char REUBank, int length, char *reuaddy, char *cpuaddy);
@ -16,4 +16,5 @@ _VerifyRAM:
jsr REURegs jsr REURegs
jsr VerifyRAM jsr VerifyRAM
txa txa
ldx #0
rts rts

View file

@ -1,8 +1,8 @@
; ;
; Maciej 'YTM/Alliance' Witkowiak ; Maciej 'YTM/Elysium' Witkowiak
; ;
; 21.12.99 ; 21.12.1999, 2.1.2003
; char GetNextChar (void); ; char GetNextChar (void);
; note that if it returns 0 (FALSE) then no characters are available ; note that if it returns 0 (FALSE) then no characters are available
@ -11,4 +11,8 @@
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
_GetNextChar = GetNextChar _GetNextChar:
jsr GetNextChar
ldx #0
tay ; preserve Z flag
rts

View file

@ -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); ; char IsMseInRegion (struct window *mywindow);
.import RectRegs .import RectRegs
.import return0, return1
.export _IsMseInRegion .export _IsMseInRegion
@ -14,4 +15,7 @@
_IsMseInRegion: _IsMseInRegion:
jsr RectRegs jsr RectRegs
jmp IsMseInRegion jsr IsMseInRegion
bne L1
jmp return0
L1: jmp return1

View file

@ -51,6 +51,7 @@ _mse_storex:
stx mouseRight+1 stx mouseRight+1
_mse_initend: _mse_initend:
lda #0 lda #0
tax
; -------------------------------------------------------------------------- ; --------------------------------------------------------------------------
; ;
; void mouse_done (void); ; void mouse_done (void);
@ -178,6 +179,7 @@ _mouse_move:
; ;
_mouse_buttons: _mouse_buttons:
ldx #0
lda pressFlag lda pressFlag
and #SET_MOUSE and #SET_MOUSE
lsr lsr

View file

@ -15,6 +15,7 @@
.include "../inc/geossym2.inc" .include "../inc/geossym2.inc"
get_ostype: get_ostype:
ldx #0
lda version lda version
and #%11110000 and #%11110000
cmp #$10 cmp #$10
@ -50,5 +51,6 @@ ntsc: lda #$80 ; NTSC
modeend: stx tmp1 modeend: stx tmp1
ora tmp1 ora tmp1
ldx #0
plp ; restore interrupt state plp ; restore interrupt state
rts rts

View file

@ -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 .export _GetRandom
.include "../inc/jumptab.inc" .include "../inc/jumptab.inc"
_GetRandom = GetRandom _GetRandom:
jsr GetRandom
ldx #0
rts