2002-11-16 23:45:15 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 15.11.2002
|
|
|
|
;
|
|
|
|
; Variables used for CBM file I/O
|
|
|
|
;
|
|
|
|
|
2012-10-16 21:39:40 +00:00
|
|
|
.export curunit
|
2010-02-14 23:12:54 +00:00
|
|
|
.constructor initcurunit, 30
|
|
|
|
.importzp devnum
|
2002-11-16 23:45:15 +00:00
|
|
|
|
|
|
|
|
2016-03-06 20:26:22 +00:00
|
|
|
.segment "INIT"
|
2010-02-14 23:12:54 +00:00
|
|
|
|
2012-10-16 21:39:40 +00:00
|
|
|
curunit:
|
2010-02-14 23:12:54 +00:00
|
|
|
.res 1
|
|
|
|
|
|
|
|
|
2016-03-06 20:26:22 +00:00
|
|
|
.segment "ONCE"
|
2010-02-14 23:12:54 +00:00
|
|
|
|
|
|
|
.proc initcurunit
|
|
|
|
|
|
|
|
lda devnum
|
|
|
|
bne @L0
|
|
|
|
lda #8 ; Default is disk
|
|
|
|
sta devnum
|
2012-10-16 21:39:40 +00:00
|
|
|
@L0: sta curunit
|
2010-02-14 23:12:54 +00:00
|
|
|
rts
|
|
|
|
|
|
|
|
.endproc
|