]> git.sur5r.net Git - cc65/commitdiff
_dio_open and _dio_close functions
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 16 Oct 2000 23:24:24 +0000 (23:24 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 16 Oct 2000 23:24:24 +0000 (23:24 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@374 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/diopncls.s [new file with mode: 0644]

diff --git a/libsrc/atari/diopncls.s b/libsrc/atari/diopncls.s
new file mode 100644 (file)
index 0000000..50899bf
--- /dev/null
@@ -0,0 +1,46 @@
+;
+; Christian Groessler, October 2000
+;
+; This file provides the __dio_open and __dio_close functions
+; Since on the Atari no real open and close is necessary, they
+; do not much. The __dio_open queries the sector size of the
+; drive which is later used by the _dio_read and _dio_write
+; functions.
+;
+; unsigned char __fastcall__ _dio_open  (_driveid_t drive_id);
+; unsigned char __fastcall__ _dio_close (_driveid_t drive_id);
+;
+
+       .export         __dio_open,__dio_close
+       .export         sectsizetab
+       .include        "atari.inc"
+
+.bss
+
+sectsizetab:
+       .res    NUMDRVS * 2
+
+.code
+
+
+.proc  __dio_open
+
+       asl     a       ; make index from drive id
+       tax
+       lda     #128    ; currently hardcoded (until I get an 815 :-)
+       sta     sectsizetab,x
+       lda     #0
+       sta     sectsizetab+1,x
+
+       ; fall thru to __dio_close
+
+.endproc
+
+.proc  __dio_close
+
+       lda     #0
+       tax
+       rts             ; return no error
+
+.endproc
+