]> git.sur5r.net Git - cc65/commitdiff
move __do_oserror and __inviocb into their own source files
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 25 Nov 2009 17:35:21 +0000 (17:35 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 25 Nov 2009 17:35:21 +0000 (17:35 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4487 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/Makefile
libsrc/atari/do_oserr.s [new file with mode: 0644]
libsrc/atari/inviocb.s [new file with mode: 0644]
libsrc/atari/rwcommon.s

index c6fff15a619d3c2a5f6ad1541bcfcacee8d28ead..43644c68654419701d69971c3f573864ec66c0d8 100644 (file)
@@ -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 (file)
index 0000000..6744b00
--- /dev/null
@@ -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 (file)
index 0000000..67a6a7c
--- /dev/null
@@ -0,0 +1,12 @@
+;
+; set EINVAL error code and returns -1
+;
+       .include "errno.inc"
+       .import __retminus
+
+       .export __inviocb
+
+__inviocb:
+       lda     #<EINVAL
+       jsr     __seterrno
+       jmp     __retminus      ; return -1
index e489634544c648c158b155701e02494e526797ed..349c7be019e2afa56efafedfa92ed06c3d93ff12 100644 (file)
@@ -5,7 +5,6 @@
        .include "atari.inc"
        .include "errno.inc"
        .import popax
-       .import __oserror
        .import fdtoiocb
 
        .export __rwsetup
@@ -42,23 +41,3 @@ iocberr:pla
        ldx     #$FF            ; indicate error + clear ZF
        rts
 
-;
-; this routine updates errno.  do a JMP here right after calling
-; CIOV.         we expect status in Y.
-;
-       .export __do_oserror,__inviocb
-__do_oserror:
-       sty     __oserror       ; save os dependent error code
-retminus:
-       lda     #$FF
-       tax                     ; return -1
-       rts
-
-;
-; sets EINVAL error code and returns -1
-;
-
-__inviocb:
-       lda     #<EINVAL
-       jsr     __seterrno
-       jmp     retminus        ; return -1