]> git.sur5r.net Git - cc65/blob - libsrc/apple2/drives.s
Added the telldir() function.
[cc65] / libsrc / apple2 / drives.s
1 ;
2 ; Oliver Schmidt, 2010-05-24
3 ;
4 ; unsigned char drivecount (void);
5 ; unsigned char* drivelist (void);
6 ;
7
8         .export         _drivecount, _drivelist
9         .import         __dos_type
10
11         .include        "mli.inc"
12
13 _drivecount:
14         ldx     #$00
15
16         ; Check for ProDOS 8
17         lda     __dos_type
18         beq     :+
19
20         ; Number of on-line devices (minus 1)
21         ldy     DEVCNT
22         iny
23         tya
24 :       rts
25
26 _drivelist:
27         ldx     #$00
28
29         ; Check for ProDOS 8
30         lda     __dos_type
31         beq     :+
32
33         ; Up to 14 units may be active
34         lda     #<DEVLST
35         ldx     #>DEVLST
36 :       rts