mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +00:00
b1dab3a37d
git-svn-id: svn://svn.cc65.org/cc65/trunk@4748 b7a2c559-68d2-44c3-8de9-860c34a00d81
36 lines
710 B
ArmAsm
36 lines
710 B
ArmAsm
;
|
|
; Oliver Schmidt, 24.03.2005
|
|
;
|
|
; dhandle_t __fastcall__ dio_open (driveid_t drive_id);
|
|
;
|
|
|
|
.export _dio_open
|
|
.import return0, __dos_type
|
|
|
|
.include "errno.inc"
|
|
.include "mli.inc"
|
|
|
|
_dio_open:
|
|
; Check for ProDOS 8
|
|
ldx __dos_type
|
|
bne :+
|
|
lda #$01 ; "Bad system call number"
|
|
bne oserr ; Branch always
|
|
|
|
; Walk device list
|
|
: ldx DEVCNT
|
|
: cmp DEVLST,x
|
|
beq :+ ; Found drive_id in device list
|
|
dex
|
|
bpl :-
|
|
lda #$28 ; "No device connected"
|
|
|
|
; Return oserror
|
|
oserr: sta __oserror
|
|
jmp return0
|
|
|
|
; Return success
|
|
: ldx #$00
|
|
stx __oserror
|
|
rts
|