mirror of
https://github.com/cc65/cc65.git
synced 2024-11-05 08:05:51 +00:00
89d4f4a90c
git-svn-id: svn://svn.cc65.org/cc65/trunk@5863 b7a2c559-68d2-44c3-8de9-860c34a00d81
28 lines
497 B
ArmAsm
28 lines
497 B
ArmAsm
;
|
|
; Oliver Schmidt, 2012-10-21
|
|
;
|
|
; unsigned char getcurrentdevice (void);
|
|
;
|
|
|
|
.export _getcurrentdevice
|
|
.import __dos_type
|
|
|
|
.include "mli.inc"
|
|
|
|
_getcurrentdevice:
|
|
|
|
; Use unit number of most recent accessed device
|
|
lda DEVNUM
|
|
lsr
|
|
lsr
|
|
lsr
|
|
lsr
|
|
|
|
; Check for ProDOS 8
|
|
ldx __dos_type
|
|
bne :+
|
|
lda #$FF ; INVALID_DEVICE
|
|
|
|
: ldx #$00
|
|
rts
|