void rebootafterexit (void);
/* Reboot machine after program termination has completed. */
+unsigned char drivecount (void);
+/* Returns the number of ProDOS 8 drives. */
+
+unsigned char* drivelist (void);
+/* Returns a pointer to the list of ProDOS 8 drives. */
+
#define ser_apple2_slot(num) ser_ioctl (0, (void *) (num))
/* Select a slot number from 1 to 7 prior to ser_open.
* The default slot number is 2.
diosectsize.o \
diowrite.o \
dosdetect.o \
+ drives.o \
filedes.o \
fileerr.o \
filename.o \
--- /dev/null
+;
+; Oliver Schmidt, 2010-05-24
+;
+; unsigned char drivecount (void);
+; unsigned char* drivelist (void);
+;
+
+ .export _drivecount, _drivelist
+ .import __dos_type
+
+ .include "mli.inc"
+
+_drivecount:
+ ldx #$00
+
+ ; Check for ProDOS 8
+ lda __dos_type
+ bne :+
+ rts
+
+ ; Number of on-line devices (minus 1)
+: ldy DEVCNT
+ iny
+ tya
+ rts
+
+_drivelist:
+ ldx #$00
+
+ ; Check for ProDOS 8
+ lda __dos_type
+ bne :+
+ rts
+
+ ; Up to 14 units may be active
+: lda #<DEVLST
+ ldx #>DEVLST
+ rts
.global callmli
DEVNUM := $BF30 ; Most recent accessed device
+DEVCNT := $BF31 ; Number of on-line devices (minus 1)
+DEVLST := $BF32 ; Up to 14 units may be active
DATELO := $BF90 ; Bits 15-9 = Year, 8-5 = Month, 4-0 = Day
TIMELO := $BF92 ; Bits 12-8 = Hour, 5-0 = Minute
PFIXPTR := $BF9A ; If = 0, no prefix active
diosectsize.o \
diowrite.o \
dosdetect.o \
+ drives.o \
filedes.o \
fileerr.o \
filename.o \