]> git.sur5r.net Git - cc65/commitdiff
Update from Oliver Schmidt
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 31 Mar 2005 07:24:01 +0000 (07:24 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 31 Mar 2005 07:24:01 +0000 (07:24 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3439 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/apple2/Makefile
libsrc/apple2/dioopen.s
libsrc/apple2/diosectcount.s [new file with mode: 0644]
libsrc/apple2/diosectsize.s [new file with mode: 0644]
libsrc/apple2enh/Makefile

index c59428871edfaea8635faa774b53773a43700cd8..697459bee8dc71a70fa33fe5f6fa842dba3d2735 100644 (file)
@@ -53,6 +53,8 @@ OBJS= _scrsize.o      \
        diocommon.o     \
        dioopen.o       \
        dioread.o       \
+       diosectcount.o  \
+       diosectsize.o   \
        diowrite.o      \
        dosdetect.o     \
         get_ostype.o    \
index 1d114f312587d4c9c6cd836a3daf668bb6ebd25d..16269daa20c7411d3aaf043b3f36bc6494e71b96 100644 (file)
@@ -6,7 +6,7 @@
 ; drive_id = (slot * 2) + (drive - 1)
 
         .export        _dio_open
-        .import                decaxy, return0
+        .import                return0
 
         .include       "zeropage.inc"
         .include       "errno.inc"
@@ -21,15 +21,19 @@ _dio_open:
         asl
         asl
         asl
+        tay                    ; Save handle
+
+        ; Set handle
         sta    mliparam + MLI::ON_LINE::UNIT_NUM
 
         ; Alloc 16-byte buffer just below stack
-        ldy    #16
         lda    sp
-        ldx    sp+1
-        jsr    decaxy
+        sec
+        sbc    #16
         sta    mliparam + MLI::ON_LINE::DATA_BUFFER
-        stx    mliparam + MLI::ON_LINE::DATA_BUFFER+1
+        lda    sp+1
+        sbc    #$00
+        sta    mliparam + MLI::ON_LINE::DATA_BUFFER+1
 
         ; Get device state
         lda    #ON_LINE_CALL
@@ -43,7 +47,7 @@ _dio_open:
         bcc    oserr
 
         ; Return success
-:       lda    mliparam + MLI::ON_LINE::UNIT_NUM
+:       tya                    ; Restore handle
         ldx    #$00
         stx    __oserror
         rts
diff --git a/libsrc/apple2/diosectcount.s b/libsrc/apple2/diosectcount.s
new file mode 100644 (file)
index 0000000..2993142
--- /dev/null
@@ -0,0 +1,12 @@
+;
+; Oliver Schmidt, 31.03.2005
+;
+; sectnum_t __fastcall__ dio_query_sectcount(dhandle_t handle);
+;
+
+        .export        _dio_query_sectcount
+
+_dio_query_sectcount:
+        lda    #<280
+        ldx    #>280
+        rts
diff --git a/libsrc/apple2/diosectsize.s b/libsrc/apple2/diosectsize.s
new file mode 100644 (file)
index 0000000..16287a2
--- /dev/null
@@ -0,0 +1,12 @@
+;
+; Oliver Schmidt, 31.03.2005
+;
+; sectsize_t __fastcall__ dio_query_sectsize(dhandle_t handle);
+;
+
+        .export        _dio_query_sectsize
+
+_dio_query_sectsize:
+        lda    #<512
+        ldx    #>512
+        rts
index ba7d3a787627edb8a68769f66a2936c48c1b6a28..7d91d049c7d0b4cd66b588ca5fc6cc1d584d5c34 100644 (file)
@@ -49,12 +49,20 @@ OBJS=       _scrsize.o      \
        crt0.o          \
        ctype.o         \
        cvline.o        \
+       dioclose.o      \
+       diocommon.o     \
+       dioopen.o       \
+       dioread.o       \
+       diosectcount.o  \
+       diosectsize.o   \
+       diowrite.o      \
        dosdetect.o     \
         get_ostype.o    \
         getenv.o        \
         joy_stddrv.o    \
        kbhit.o         \
         mainargs.o      \
+       mli.o           \
         oserrlist.o     \
         randomize.o     \
         rcout.o         \