mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 00:29:31 +00:00
Much better approach for ProDOS 8 IO-buffer custom implementations - the first one was actually kind of stupid.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4155 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
c8e1d7e0d2
commit
736db8789e
@ -4,12 +4,9 @@
|
||||
; 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
|
||||
|
@ -114,7 +114,6 @@ EOF_COUNT = 2
|
||||
.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
|
||||
|
@ -5,8 +5,7 @@
|
||||
;
|
||||
|
||||
.import __dos_type
|
||||
.import iobuf_init, iobuf_done
|
||||
.export iobuf_nop
|
||||
.import iobuf_mli
|
||||
|
||||
.include "mli.inc"
|
||||
|
||||
@ -26,16 +25,12 @@ callmli:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user