1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00
cc65/libsrc/apple2/drives.s

37 lines
653 B
ArmAsm
Raw Normal View History

;
; 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
beq :+
; Number of on-line devices (minus 1)
ldy DEVCNT
iny
tya
: rts
_drivelist:
ldx #$00
; Check for ProDOS 8
lda __dos_type
beq :+
; Up to 14 units may be active
lda #<DEVLST
ldx #>DEVLST
: rts