]> git.sur5r.net Git - cc65/commitdiff
Much better approach for ProDOS 8 IO-buffer custom implementations - the first one...
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 11 Sep 2009 19:54:29 +0000 (19:54 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 11 Sep 2009 19:54:29 +0000 (19:54 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4155 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/apple2/iobuf.s
libsrc/apple2/mli.inc
libsrc/apple2/mli.s

index fc412c241e973ca135f76ef18e1868c2c3e8295d..699f3d90122dd6be40c5e2aa1ae01b3d88f7fa2d 100644 (file)
@@ -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
index 6c29b275e91bbc8c97071c8595b17288b4e0e907..2134c8785049814530a79e5ebb9e08ea32ed459f 100644 (file)
@@ -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
index 48e09e7188c3eaa3982b7731cff29195fb66075d..9469ce9607667f084a2b786876240660b0835a40 100644 (file)
@@ -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