1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-13 09:31:53 +00:00

Clear __oserror on success.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4721 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
ol.sc 2010-06-15 21:44:18 +00:00
parent 155c5629a9
commit 148a6569e5
6 changed files with 13 additions and 10 deletions

View File

@ -7,7 +7,6 @@
.export _close
.import closedirect, freebuffer
.import return0
.include "errno.inc"
.include "filedes.inc"
@ -32,10 +31,10 @@ zerofd: lda #$00
jsr freebuffer
; Return success
jmp return0
; Set __errno
errno: jmp __directerrno
lda #$00
; Set __oserror
oserr: jmp __mappederrno
; Set __errno
errno: jmp __directerrno

View File

@ -199,6 +199,7 @@ done: lda tmp1 ; Restore fd
; Return success
ldx #$00
stx __oserror
rts
freebuffer:

View File

@ -47,8 +47,11 @@ _read:
ldy #READ_CALL
jmp rwcommon
; Set counter to zero
; Device succeeds always
device: lda #$00
sta __oserror
; Set counter to zero
sta ptr3
sta ptr3+1

View File

@ -46,9 +46,7 @@ _rootdir:
lda #$00
sta (ptr1),y
; Return success
tax
rts
; Return success ; A = 0
; Set __oserror
oserr: jmp __mappederrno

View File

@ -51,6 +51,7 @@ rwcommon:
rwepilog:
; Return success
sta __oserror ; A = 0
lda mliparam + MLI::RW::TRANS_COUNT
ldx mliparam + MLI::RW::TRANS_COUNT+1
rts

View File

@ -100,7 +100,8 @@ output: jsr COUT ; Preserves X and Y
bpl next
; Return success
done: jmp rwepilog
done: lda #$00
jmp rwepilog
; Load errno code
einval: lda #EINVAL