]> git.sur5r.net Git - cc65/commitdiff
some fixes
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 28 Oct 2010 21:02:09 +0000 (21:02 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 28 Oct 2010 21:02:09 +0000 (21:02 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4829 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/posixdirent.s

index 0c401ed120f598016ef2fa7c50efedc74f8202f7..b22a9c95e191132acdb4dbb88369ab0040ec0c13 100644 (file)
@@ -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:*.*"