From e673b53850b0f7f2a759ba664eba8abf248fc12b Mon Sep 17 00:00:00 2001 From: cpg Date: Tue, 6 Jul 2010 22:43:19 +0000 Subject: [PATCH] adapt to new oserror/errno handling git-svn-id: svn://svn.cc65.org/cc65/trunk@4732 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/atari/do_oserr.s | 15 +++++---------- libsrc/atari/graphics.s | 4 +--- libsrc/atari/inviocb.s | 4 +--- libsrc/atari/lseek.s | 15 +++++++++------ libsrc/atari/open.s | 7 ++++--- 5 files changed, 20 insertions(+), 25 deletions(-) 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 #