]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari/close.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / atari / close.s
index c7995e9532750a1165274013882f668c8cbe3f94..d89a0ee13c205ed24e126435e21e94454db2d12e 100644 (file)
@@ -1,7 +1,7 @@
 ;
 ; Christian Groessler, May-2000
 ;
-; int close(int fd);
+; int __fastcall__ close(int fd);
 ;
 
        .include "atari.inc"
        .import fdtoiocb_down,__inviocb
 
 .proc  _close
-       jsr     popax
        jsr     fdtoiocb_down           ; get iocb index into X and decr. usage count
        bmi     inverr
        bne     ok                      ; not last one -> don't close yet
-;      asl     a
-;      asl     a
-;      asl     a
-;      asl     a
-;      tax
        lda     #CLOSE
        sta     ICCOM,x
        jsr     CIOV
-       bpl     ok
-       jmp     __do_oserror
-
+       bmi     closerr
 ok:    ldx     #0
        stx     __oserror               ; clear system specific error code
        txa
        rts
 
 inverr:        jmp     __inviocb
+closerr:jmp    __do_oserror
 
 .endproc