]> git.sur5r.net Git - cc65/blobdiff - libsrc/cbm/c_open.s
Don't set errno when the regular end of directory is reached. Plus minor code
[cc65] / libsrc / cbm / c_open.s
index 559f90771bf9b820eea4b6c4490a4646416a1428..9a1e08f919c2c4f8cfe50094e432bbf2b858f1bd 100644 (file)
@@ -1,19 +1,16 @@
 ;
 ; Ullrich von Bassewitz, 03.06.1999
 ;
-; unsigned __fastcall__ cbm_open (void);
+; unsigned char cbm_k_open (void);
 ;
 
-       .include        "cbm.inc"
+               .export         _cbm_k_open
+        .import         OPEN
 
-               .export         _cbm_open
 
-_cbm_open:
+_cbm_k_open:
        jsr     OPEN
-       ldx     #0
-       bcc     @Ok
-       inx
-       rts
-@Ok:   txa
-       rts
-
+       ldx     #0              ; Clear high byte
+       bcs     @NotOk
+        txa
+@NotOk: rts