mirror of
https://github.com/cc65/cc65.git
synced 2025-08-16 12:27:49 +00:00
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
This commit is contained in:
@@ -76,6 +76,7 @@ OBJS = _scrsize.o \
|
|||||||
dioread.o \
|
dioread.o \
|
||||||
diowrite.o \
|
diowrite.o \
|
||||||
diowritev.o \
|
diowritev.o \
|
||||||
|
do_oserr.o \
|
||||||
dosdetect.o \
|
dosdetect.o \
|
||||||
fdtable.o \
|
fdtable.o \
|
||||||
fdtoiocb.o \
|
fdtoiocb.o \
|
||||||
@@ -86,6 +87,7 @@ OBJS = _scrsize.o \
|
|||||||
gotoy.o \
|
gotoy.o \
|
||||||
gotoxy.o \
|
gotoxy.o \
|
||||||
graphics.o \
|
graphics.o \
|
||||||
|
inviocb.o \
|
||||||
joy_stddrv.o \
|
joy_stddrv.o \
|
||||||
kbhit.o \
|
kbhit.o \
|
||||||
lseek.o \
|
lseek.o \
|
||||||
|
15
libsrc/atari/do_oserr.s
Normal file
15
libsrc/atari/do_oserr.s
Normal file
@@ -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
|
12
libsrc/atari/inviocb.s
Normal file
12
libsrc/atari/inviocb.s
Normal file
@@ -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
|
@@ -5,7 +5,6 @@
|
|||||||
.include "atari.inc"
|
.include "atari.inc"
|
||||||
.include "errno.inc"
|
.include "errno.inc"
|
||||||
.import popax
|
.import popax
|
||||||
.import __oserror
|
|
||||||
.import fdtoiocb
|
.import fdtoiocb
|
||||||
|
|
||||||
.export __rwsetup
|
.export __rwsetup
|
||||||
@@ -42,23 +41,3 @@ iocberr:pla
|
|||||||
ldx #$FF ; indicate error + clear ZF
|
ldx #$FF ; indicate error + clear ZF
|
||||||
rts
|
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
|
|
||||||
|
Reference in New Issue
Block a user