mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Return NULL on error (or end of directory).
This commit is contained in:
parent
944ebbc23c
commit
d8e6fa61bb
@ -5,7 +5,7 @@
|
||||
|
||||
; struct filehandle* Get1stDirEntry (void);
|
||||
|
||||
.import __oserror
|
||||
.import __oserror, return0
|
||||
.export _Get1stDirEntry
|
||||
|
||||
.include "diskdrv.inc"
|
||||
@ -14,6 +14,10 @@
|
||||
_Get1stDirEntry:
|
||||
jsr Get1stDirEntry
|
||||
stx __oserror
|
||||
lda r5L
|
||||
txa
|
||||
beq L0 ; error?
|
||||
jmp return0 ; return NULL
|
||||
|
||||
L0: lda r5L
|
||||
ldx r5H
|
||||
rts
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
; struct filehandle* GetNxtDirEntry (void);
|
||||
|
||||
.import __oserror
|
||||
.import __oserror, return0
|
||||
.export _GetNxtDirEntry
|
||||
|
||||
.include "diskdrv.inc"
|
||||
@ -14,6 +14,12 @@
|
||||
_GetNxtDirEntry:
|
||||
jsr GetNxtDirEntry
|
||||
stx __oserror
|
||||
lda r5L
|
||||
txa
|
||||
beq L0 ; error?
|
||||
tya
|
||||
beq L0 ; end of dir?
|
||||
jmp return0 ; return NULL
|
||||
|
||||
L0: lda r5L
|
||||
ldx r5H
|
||||
rts
|
||||
|
Loading…
x
Reference in New Issue
Block a user