]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari/lseek.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / atari / lseek.s
index ac033004c46cb5f0f37e278bb6a1f096e6cd6e42..244095969f26d6a571396d99cb6c5297112e1d49 100644 (file)
 ; seeking not supported, return -1 and ENOSYS errno value
 no_supp:jsr    incsp6
        lda     #<ENOSYS
-       jsr     __seterrno      ; set __errno, return zero in A
-               sta     __oserror
-       lda     #$FF
-       tax
+       jsr     __directerrno   ; returns with $FFFF in AX
        sta     sreg
        sta     sreg+1
        rts
@@ -93,8 +90,14 @@ end: ldx     tmp3
        bpl     l01
 
 ; error returned from CIO
-xxerr: sty     __oserror
-       bmi     iocberr
+xxerr: tya
+       pha
+       jsr     incsp6
+       pla
+       jsr     __mappederrno   ; returns with $FFFF in AX
+       sta     sreg
+       sta     sreg+1
+       rts
 
 ; check for offset 0, SEEK_CUR (get current position)
 cont:  ldy     #3