]> git.sur5r.net Git - cc65/blob - libsrc/apple2/drives.s
Renamed the defines in symdefs.h to something more meaningful. They were named
[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         bne     :+
19         rts
20
21         ; Number of on-line devices (minus 1)
22 :       ldy     DEVCNT
23         iny
24         tya
25         rts
26
27 _drivelist:
28         ldx     #$00
29
30         ; Check for ProDOS 8
31         lda     __dos_type
32         bne     :+
33         rts
34
35         ; Up to 14 units may be active
36 :       lda     #<DEVLST
37         ldx     #>DEVLST
38         rts