diff --git a/libsrc/atari/do_oserr.s b/libsrc/atari/do_oserr.s index 7782ac868..534ba2e78 100644 --- a/libsrc/atari/do_oserr.s +++ b/libsrc/atari/do_oserr.s @@ -1,17 +1,12 @@ ; -; __do_oserror updates __oserror. Do a JMP here right after calling -; CIOV. It will return with AX set to -1 ($FFFF). It expects the CIO +; __do_oserror updates __oserror and errno. Do a JMP here right after +; calling CIOV. It will return with AX set to -1 ($FFFF). It expects the CIO ; status in Y. -; -; __retminus is a routine whitch returns with AX set to -1 ($FFFF). ; .include "errno.inc" - .export __do_oserror, __retminus + .export __do_oserror __do_oserror: - sty __oserror ; save os dependent error code -__retminus: - lda #$FF - tax ; return -1 - rts + tya + jmp __mappederrno diff --git a/libsrc/atari/graphics.s b/libsrc/atari/graphics.s index 3b2c07cbd..120865f82 100644 --- a/libsrc/atari/graphics.s +++ b/libsrc/atari/graphics.s @@ -44,9 +44,7 @@ parmok: jsr findfreeiocb beq iocbok ; we found one lda #EINVAL diff --git a/libsrc/atari/inviocb.s b/libsrc/atari/inviocb.s index 67a6a7c42..b7954dd11 100644 --- a/libsrc/atari/inviocb.s +++ b/libsrc/atari/inviocb.s @@ -2,11 +2,9 @@ ; set EINVAL error code and returns -1 ; .include "errno.inc" - .import __retminus .export __inviocb __inviocb: lda #