From 03ed1b3a6aa319e263cfa7aa14d2622f3dd505fa Mon Sep 17 00:00:00 2001 From: cpg Date: Thu, 28 Oct 2010 21:02:09 +0000 Subject: [PATCH] some fixes git-svn-id: svn://svn.cc65.org/cc65/trunk@4829 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/atari/posixdirent.s | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libsrc/atari/posixdirent.s b/libsrc/atari/posixdirent.s index 0c401ed12..b22a9c95e 100644 --- a/libsrc/atari/posixdirent.s +++ b/libsrc/atari/posixdirent.s @@ -41,7 +41,7 @@ _opendir: sta ptr1 cioerr: sty __oserror jmp return0 - .proc _readdir +.proc _readdir tax lda #GETREC sta ICCOM,x @@ -90,24 +90,27 @@ cioerr: sty __oserror rts copychar: lda (ptr1),y ; src=y dest=tmp1 - cmp #' ' ldy tmp1 + cmp #' ' beq @break sta (ptr1),y iny sty tmp1 @break: rts - .endproc +.endproc - .proc _closedir +.proc _closedir tax lda #CLOSE sta ICCOM,x jsr CIOV bmi @cioerr + ldx #0 + stx __oserror ; clear system specific error code + txa rts @cioerr: jmp __do_oserror - .endproc +.endproc .rodata defdev: .asciiz "D:*.*" -- 2.39.5