]> git.sur5r.net Git - cc65/commitdiff
New version from Oliver Schmidt
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 26 Mar 2005 17:23:14 +0000 (17:23 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 26 Mar 2005 17:23:14 +0000 (17:23 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3423 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/Makefile
libsrc/apple2/mli.inc [new file with mode: 0644]

index f1b85c1562c7eaead9b0b11f08ee1ee7b7e66b52..9c0bdebdc94eab271769f7732e3094a8f791ad6d 100644 (file)
@@ -56,31 +56,15 @@ apple2lib:
 # Apple //e
 
 apple2enhlib:
-       for i in apple2 apple2enh common runtime conio dbg em joystick tgi zlib; do \
+       for i in apple2enh common runtime conio dbg em joystick tgi zlib; do \
            $(MAKE) SYS=apple2enh -C $$i || exit 1; \
-       done
-       for i in common runtime conio dbg em joystick tgi zlib; do \
            $(AR) a apple2enh.lib $$i/*.o;\
        done
-       for objfile in apple2/*.o; do \
-           basefile=`basename $$objfile .o`; \
-           if [ -f ../apple2enh/$$basefile ]; then \
-               $(AR) a apple2enh.lib ../apple2enh/$$basefile; \
-           else \
-               $(AR) a apple2enh.lib $$objfile; \
-           fi \
-       done
-       for objfile in apple2enh/*.o; do \
-           basefile=`basename $$objfile .o`; \
-           if [ \! -f ../apple2/$$basefile ]; then \
-               $(AR) a apple2enh.lib $$objfile; \
-           fi \
-       done
-       mv apple2/crt0.o apple2enh.o
-       cp apple2/apple2-lc.emd a2e.lc.emd
-       cp apple2/apple2-280-192-6.tgi a2e.hi.tgi
-       cp apple2/apple2-40-40-16.tgi a2e.lo.tgi
-       cp apple2/apple2-stdjoy.joy a2e.stdjoy.joy
+       mv apple2enh/crt0.o apple2enh.o
+       cp apple2enh/apple2-lc.emd a2e.lc.emd
+       cp apple2enh/apple2-280-192-6.tgi a2e.hi.tgi
+       cp apple2enh/apple2-40-40-16.tgi a2e.lo.tgi
+       cp apple2enh/apple2-stdjoy.joy a2e.stdjoy.joy
 
 #-----------------------------------------------------------------------------
 # Atari
diff --git a/libsrc/apple2/mli.inc b/libsrc/apple2/mli.inc
new file mode 100644 (file)
index 0000000..6f5368c
--- /dev/null
@@ -0,0 +1,84 @@
+;
+; Oliver Schmidt, 30.12.2004
+;
+; Apple ProDOS 8 MLI
+;
+
+CREATE_CALL     = $C0
+CREATE_COUNT    = 7
+
+ON_LINE_CALL    = $C5
+ON_LINE_COUNT   = 2
+
+OPEN_CALL       = $C8
+OPEN_COUNT      = 3
+
+READ_CALL       = $CA
+WRITE_CALL      = $CB
+RW_COUNT        = 4
+
+CLOSE_CALL      = $CC
+CLOSE_COUNT     = 1
+
+SET_MARK_CALL   = $CE
+GET_MARK_CALL   = $CF
+MARK_COUNT      = 2
+
+SET_EOF_CALL    = $D0
+GET_EOF_CALL    = $D1
+EOF_COUNT       = 2
+
+        .struct MLI
+                .union
+                        .struct CREATE
+                                PARAM_COUNT    .byte
+                                PATHNAME       .addr
+                                ACCESS         .byte
+                                FILE_TYPE      .byte
+                                AUX_TYPE       .word
+                                STORAGE_TYPE   .byte
+                                CREATE_DATE    .word
+                                CREATE_TIME    .word
+                        .endstruct
+                        .struct        ON_LINE
+                                PARAM_COUNT    .byte
+                                UNIT_NUM       .byte
+                                DATA_BUFFER    .addr
+                        .endstruct
+                        .struct OPEN
+                                PARAM_COUNT    .byte
+                                PATHNAME       .addr
+                                IO_BUFFER      .addr
+                                REF_NUM                .byte
+                        .endstruct
+                        .struct RW
+                                PARAM_COUNT    .byte
+                                REF_NUM                .byte
+                                DATA_BUFFER    .addr
+                                REQUEST_COUNT  .word
+                                TRANS_COUNT    .word
+                        .endstruct
+                        .struct CLOSE
+                                PARAM_COUNT    .byte
+                                REF_NUM                .byte
+                        .endstruct
+                        .struct MARK
+                                PARAM_COUNT    .byte
+                                REF_NUM                .byte
+                                POSITION       .byte 3
+                        .endstruct
+                        .struct EOF
+                                PARAM_COUNT    .byte
+                                REF_NUM                .byte
+                                EOF            .byte 3
+                        .endstruct
+                .endunion
+        .endstruct
+
+        .global                mliparam
+        .global                callmli
+
+ENTRY   :=     $BF00           ; MLI call entry point
+DEVNUM  :=     $BF30           ; Most recent accessed device
+PFIXPTR :=     $BF9A           ; If = 0, no prefix active
+KVERSION:=      $BFFF          ; Kernel version number