]> git.sur5r.net Git - cc65/blob - libsrc/atari/do_oserr.s
6744b005898c25a855b04d3e4e6938b8609bbe92
[cc65] / libsrc / atari / do_oserr.s
1 ;
2 ; this routine updates errno.  do a JMP here right after calling
3 ; CIOV.  we expect status in Y.
4 ; __retminus is a routine with returns AX with $FFFF
5 ;
6         .include "errno.inc"
7
8         .export __do_oserror, __retminus
9
10 __do_oserror:
11         sty     __oserror       ; save os dependent error code
12 __retminus:
13         lda     #$FF
14         tax                     ; return -1
15         rts