mirror of
https://github.com/cc65/cc65.git
synced 2024-12-26 08:32:00 +00:00
Save a few bytes and cycles.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4707 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
75fbc5c5e3
commit
23901280c9
@ -16,17 +16,13 @@
|
|||||||
.proc oserrcheck
|
.proc oserrcheck
|
||||||
|
|
||||||
sta __oserror ; Store the error code
|
sta __oserror ; Store the error code
|
||||||
tay ; Did we have an error?
|
tax ; Did we have an error?
|
||||||
beq ok ; Branch if no
|
beq ok ; Branch if no
|
||||||
jsr __osmaperrno ; Map os error into errno code
|
jsr __osmaperrno ; Map os error into errno code
|
||||||
sta __errno
|
jsr __seterrno ; Save in errno
|
||||||
stx __errno+1 ; Save in errno
|
|
||||||
lda #$FF ; Return -1
|
lda #$FF ; Return -1
|
||||||
|
tax ; Make high byte also zero
|
||||||
; Error free, A contains zero
|
ok: rts
|
||||||
|
|
||||||
ok: tax ; Make high byte also zero
|
|
||||||
rts
|
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user