XSKIP = $0874 ; skip parameter
XMOVE = $0877 ; move filename
XGNUM = $087A ; get number
+XDEFDEV = $0816 ; current drive * undocumented *
;-------------------------------------------------------------------------
; End of atari.inc
__getdefdev:
lda __dos_type ; which DOS?
- cmp #OSADOS+1
- bcs finish ; only supported on OS/A+ and SpartaDOS
- ; (TODO: add XDOS support)
+ cmp #XDOS
+ beq xdos ; only supported on XDOS ...
+; cmp #OSADOS+1 ; (redundant: #OSADOS+1 = #XDOS)
+ bcs finish ; ... and on OS/A+ and SpartaDOS
ldy #BUFOFF
lda #0
sta __defdev
iny
lda (DOSVEC),y
- sta __defdev+1
+done: sta __defdev+1
; Return pointer to default device
ldx #>__defdev
rts
+; XDOS version
+
+xdos: lda XDEFDEV
+ bne done
+
.data
; Default device