; Default ProDOS 8 I/O buffer management
;
- .export iobuf_alloc, iobuf_free
- .export iobuf_init, iobuf_done
- .import iobuf_nop
+ .export iobuf_alloc, iobuf_free, iobuf_mli
.import _posix_memalign, _free
iobuf_alloc := _posix_memalign
iobuf_free := _free
-iobuf_init := iobuf_nop
-iobuf_done := iobuf_nop
+iobuf_mli := $BF00
.global mliparam
.global callmli
-ENTRY := $BF00 ; MLI call entry point
DEVNUM := $BF30 ; Most recent accessed device
DATELO := $BF90 ; Bits 15-9 = Year, 8-5 = Month, 4-0 = Day
TIMELO := $BF92 ; Bits 12-8 = Hour, 5-0 = Minute
;
.import __dos_type
- .import iobuf_init, iobuf_done
- .export iobuf_nop
+ .import iobuf_mli
.include "mli.inc"
beq oserr
; Call MLI and return
- jsr iobuf_init
- jsr ENTRY
+ jsr iobuf_mli
call: .byte $00
.addr mliparam
- jmp iobuf_done
+ rts
; Load oserror code and return
oserr: lda #$01 ; "Invalid MLI function code number"
sec
- ; Fall through
-
-iobuf_nop:
rts