]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/_fopen.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / _fopen.s
index a7a9eb4b5e1fc5a6df5f89f438fd6322106e0909..29f1c4cd92165ff1de2d1d4f03a522793a3c514c 100644 (file)
 
 invmode:
         lda     #EINVAL
-        sta     __errno
-        lda     #0
-        sta     __errno+1
-        tax
+        jsr     __seterrno      ; Set __errno, returns zero in A
+        tax                     ; a/x = 0
         jmp     incsp4
 
 ; Mode string successfully parsed. Store the binary mode onto the stack in