]> git.sur5r.net Git - cc65/blob - libsrc/atari/diopncls.s
50899bfe7a166f4d943d7989ba36780a29fb77e6
[cc65] / libsrc / atari / diopncls.s
1 ;
2 ; Christian Groessler, October 2000
3 ;
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 queries the sector size of the
7 ; drive which is later used by the _dio_read and _dio_write
8 ; functions.
9 ;
10 ; unsigned char __fastcall__ _dio_open  (_driveid_t drive_id);
11 ; unsigned char __fastcall__ _dio_close (_driveid_t drive_id);
12 ;
13
14         .export         __dio_open,__dio_close
15         .export         sectsizetab
16         .include        "atari.inc"
17
18 .bss
19
20 sectsizetab:
21         .res    NUMDRVS * 2
22
23 .code
24
25
26 .proc   __dio_open
27
28         asl     a       ; make index from drive id
29         tax
30         lda     #128    ; currently hardcoded (until I get an 815 :-)
31         sta     sectsizetab,x
32         lda     #0
33         sta     sectsizetab+1,x
34
35         ; fall thru to __dio_close
36
37 .endproc
38
39 .proc   __dio_close
40
41         lda     #0
42         tax
43         rts             ; return no error
44
45 .endproc
46