Fixed sources to use the new __mappederrno and __directerrno functions, and

made handling of _oserror and errno consistent.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4731 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2010-06-26 11:28:44 +00:00
parent 672cffa1d2
commit ae98a6db40
4 changed files with 44 additions and 55 deletions

View File

@@ -37,18 +37,10 @@
jsr popax ; Get the handle
cpx #$01
bcs invhandle
cmp #MAX_FDS
bcs invhandle
bcs @L9
cmp #MAX_FDS ; Set carry if fd too large
sta tmp2
rts ; Return with carry clear
invhandle:
lda #EINVAL
sta __errno
lda #0
sta __errno+1
rts ; Return with carry set
@L9: rts ; Return with result in carry
.endproc