mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 04:30:10 +00:00
Atari: get current drive on XDOS
This commit is contained in:
parent
b979fb5763
commit
9523fa2d33
@ -1021,6 +1021,7 @@ XGLIN = $0871 ; get line
|
||||
XSKIP = $0874 ; skip parameter
|
||||
XMOVE = $0877 ; move filename
|
||||
XGNUM = $087A ; get number
|
||||
XDEFDEV = $0816 ; current drive * undocumented *
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; End of atari.inc
|
||||
|
@ -27,9 +27,10 @@
|
||||
__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
|
||||
@ -68,7 +69,7 @@ crvec: jsr $FFFF ; will be set to crunch vector
|
||||
sta __defdev
|
||||
iny
|
||||
lda (DOSVEC),y
|
||||
sta __defdev+1
|
||||
done: sta __defdev+1
|
||||
|
||||
; Return pointer to default device
|
||||
|
||||
@ -76,6 +77,11 @@ finish: lda #<__defdev
|
||||
ldx #>__defdev
|
||||
rts
|
||||
|
||||
; XDOS version
|
||||
|
||||
xdos: lda XDEFDEV
|
||||
bne done
|
||||
|
||||
.data
|
||||
|
||||
; Default device
|
||||
|
Loading…
Reference in New Issue
Block a user