]> git.sur5r.net Git - cc65/blobdiff - libsrc/cbm/rwcommon.s
Added the telldir() function.
[cc65] / libsrc / cbm / rwcommon.s
index 215ddc9aab59ee0e248ab319e9acf0df4055dec6..c044b6c38e3b4a96103c1fd5c0c92687acbe0d67 100644 (file)
 
         jsr     popax           ; Get the handle
         cpx     #$01
-        bcs     invhandle
-        cmp     #MAX_FDS
-        bcs     invhandle
+        bcs     @L9
+        cmp     #MAX_FDS        ; Set carry if fd too large
         sta     tmp2
-        rts                     ; Return with carry clear
-
-invhandle:
-        lda     #EINVAL
-        sta     __errno
-        lda     #0
-        sta     __errno+1
-        rts                     ; Return with carry set
+@L9:    rts                     ; Return with result in carry
 
 .endproc