dioread.o \
diowrite.o \
diowritev.o \
+ do_oserr.o \
dosdetect.o \
fdtable.o \
fdtoiocb.o \
gotoy.o \
gotoxy.o \
graphics.o \
+ inviocb.o \
joy_stddrv.o \
kbhit.o \
lseek.o \
--- /dev/null
+;
+; 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
--- /dev/null
+;
+; set EINVAL error code and returns -1
+;
+ .include "errno.inc"
+ .import __retminus
+
+ .export __inviocb
+
+__inviocb:
+ lda #<EINVAL
+ jsr __seterrno
+ jmp __retminus ; return -1
.include "atari.inc"
.include "errno.inc"
.import popax
- .import __oserror
.import fdtoiocb
.export __rwsetup
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