.export _close
.import closedirect, freebuffer
- .import return0
.include "errno.inc"
.include "filedes.inc"
jsr freebuffer
; Return success
- jmp return0
-
- ; Set __errno
-errno: jmp __directerrno
+ lda #$00
; Set __oserror
oserr: jmp __mappederrno
+
+ ; Set __errno
+errno: jmp __directerrno
; Return success
ldx #$00
+ stx __oserror
rts
freebuffer:
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
lda #$00
sta (ptr1),y
- ; Return success
- tax
- rts
+ ; Return success ; A = 0
; Set __oserror
oserr: jmp __mappederrno
rwepilog:
; Return success
+ sta __oserror ; A = 0
lda mliparam + MLI::RW::TRANS_COUNT
ldx mliparam + MLI::RW::TRANS_COUNT+1
rts
bpl next
; Return success
-done: jmp rwepilog
+done: lda #$00
+ jmp rwepilog
; Load errno code
einval: lda #EINVAL