2 ; Christian Groessler, October 2000
4 ; This file provides the __dio_open and __dio_close functions
5 ; Since on the Atari no real open and close is necessary, they
6 ; do not much. The __dio_open sets the sector size of the
7 ; drive which is later used by the _dio_read and _dio_write
10 ; dhandle_t __fastcall__ dio_open (driveid_t drive_id);
11 ; unsigned char __fastcall__ dio_close (dhandle_t handle);
14 .export _dio_open,_dio_close
24 .res NUMDRVS * sst_size
31 cmp #NUMDRVS ; valid drive id?
34 asl a ; make index from drive id
37 lda #128 ; currently hardcoded (until I get an 815 :-)
38 sta sectsizetab+sst_sectsize,x
39 sta sectsizetab+sst_flag,x ; set flag that drive is "open"
41 sta sectsizetab+sst_sectsize+1,x
42 sta __oserror ; success
44 sta sectsizetab+sst_driveno,x
46 ; sta sectsizetab+sst_id+1,x
59 lda #NONDEV ; non-existent device
74 sta __oserror ; success