From: cpg Date: Wed, 25 Nov 2009 17:35:21 +0000 (+0000) Subject: move __do_oserror and __inviocb into their own source files X-Git-Tag: V2.13.1~42 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7fb08aa74981e137c5c257e8bd8e88132c433955;p=cc65 move __do_oserror and __inviocb into their own source files git-svn-id: svn://svn.cc65.org/cc65/trunk@4487 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/atari/Makefile b/libsrc/atari/Makefile index c6fff15a6..43644c686 100644 --- a/libsrc/atari/Makefile +++ b/libsrc/atari/Makefile @@ -76,6 +76,7 @@ OBJS = _scrsize.o \ dioread.o \ diowrite.o \ diowritev.o \ + do_oserr.o \ dosdetect.o \ fdtable.o \ fdtoiocb.o \ @@ -86,6 +87,7 @@ OBJS = _scrsize.o \ gotoy.o \ gotoxy.o \ graphics.o \ + inviocb.o \ joy_stddrv.o \ kbhit.o \ lseek.o \ diff --git a/libsrc/atari/do_oserr.s b/libsrc/atari/do_oserr.s new file mode 100644 index 000000000..6744b0058 --- /dev/null +++ b/libsrc/atari/do_oserr.s @@ -0,0 +1,15 @@ +; +; this routine updates errno. do a JMP here right after calling +; CIOV. we expect status in Y. +; __retminus is a routine with returns AX with $FFFF +; + .include "errno.inc" + + .export __do_oserror, __retminus + +__do_oserror: + sty __oserror ; save os dependent error code +__retminus: + lda #$FF + tax ; return -1 + rts diff --git a/libsrc/atari/inviocb.s b/libsrc/atari/inviocb.s new file mode 100644 index 000000000..67a6a7c42 --- /dev/null +++ b/libsrc/atari/inviocb.s @@ -0,0 +1,12 @@ +; +; set EINVAL error code and returns -1 +; + .include "errno.inc" + .import __retminus + + .export __inviocb + +__inviocb: + lda #