mirror of
https://github.com/cc65/cc65.git
synced 2024-11-02 18:06:48 +00:00
272b8e7185
git-svn-id: svn://svn.cc65.org/cc65/trunk@5852 b7a2c559-68d2-44c3-8de9-860c34a00d81
35 lines
655 B
ArmAsm
35 lines
655 B
ArmAsm
;
|
|
; Oliver Schmidt, 2012-09-04
|
|
;
|
|
; unsigned char getfirstdevice (void);
|
|
; unsigned char __fastcall__ getnextdevice (unsigned char device);
|
|
;
|
|
|
|
.export _getfirstdevice
|
|
.export _getnextdevice
|
|
.import __dos_type, isdevice
|
|
|
|
.include "zeropage.inc"
|
|
|
|
_getfirstdevice:
|
|
lda #$FF
|
|
; Fall through
|
|
|
|
_getnextdevice:
|
|
tax
|
|
next: inx
|
|
cpx #$FF
|
|
beq done
|
|
|
|
; Check for ProDOS 8
|
|
lda __dos_type
|
|
beq next
|
|
|
|
; Check for valid device
|
|
jsr isdevice
|
|
bne next
|
|
|
|
done: txa
|
|
ldx #$00
|
|
rts
|