1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-02 15:29:33 +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:
ol.sc 2009-09-11 19:54:29 +00:00
parent c8e1d7e0d2
commit 736db8789e
3 changed files with 5 additions and 14 deletions

View File

@ -4,12 +4,9 @@
; Default ProDOS 8 I/O buffer management ; Default ProDOS 8 I/O buffer management
; ;
.export iobuf_alloc, iobuf_free .export iobuf_alloc, iobuf_free, iobuf_mli
.export iobuf_init, iobuf_done
.import iobuf_nop
.import _posix_memalign, _free .import _posix_memalign, _free
iobuf_alloc := _posix_memalign iobuf_alloc := _posix_memalign
iobuf_free := _free iobuf_free := _free
iobuf_init := iobuf_nop iobuf_mli := $BF00
iobuf_done := iobuf_nop

View File

@ -114,7 +114,6 @@ EOF_COUNT = 2
.global mliparam .global mliparam
.global callmli .global callmli
ENTRY := $BF00 ; MLI call entry point
DEVNUM := $BF30 ; Most recent accessed device DEVNUM := $BF30 ; Most recent accessed device
DATELO := $BF90 ; Bits 15-9 = Year, 8-5 = Month, 4-0 = Day DATELO := $BF90 ; Bits 15-9 = Year, 8-5 = Month, 4-0 = Day
TIMELO := $BF92 ; Bits 12-8 = Hour, 5-0 = Minute TIMELO := $BF92 ; Bits 12-8 = Hour, 5-0 = Minute

View File

@ -5,8 +5,7 @@
; ;
.import __dos_type .import __dos_type
.import iobuf_init, iobuf_done .import iobuf_mli
.export iobuf_nop
.include "mli.inc" .include "mli.inc"
@ -26,16 +25,12 @@ callmli:
beq oserr beq oserr
; Call MLI and return ; Call MLI and return
jsr iobuf_init jsr iobuf_mli
jsr ENTRY
call: .byte $00 call: .byte $00
.addr mliparam .addr mliparam
jmp iobuf_done rts
; Load oserror code and return ; Load oserror code and return
oserr: lda #$01 ; "Invalid MLI function code number" oserr: lda #$01 ; "Invalid MLI function code number"
sec sec
; Fall through
iobuf_nop:
rts rts