]> git.sur5r.net Git - cc65/blob - libsrc/atari/do_oserr.s
DIO functions always set _oserror.
[cc65] / libsrc / atari / do_oserr.s
1 ;
2 ; __do_oserror updates __oserror.  Do a JMP here right after calling
3 ; CIOV.  It will return with AX set to -1 ($FFFF).  It expects the CIO
4 ; status in Y.
5 ;
6 ; __retminus is a routine whitch returns with AX set to -1 ($FFFF).
7 ;
8         .include "errno.inc"
9
10         .export __do_oserror, __retminus
11
12 __do_oserror:
13         sty     __oserror       ; save os dependent error code
14 __retminus:
15         lda     #$FF
16         tax                     ; return -1
17         rts