mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +00:00
40 lines
596 B
ArmAsm
40 lines
596 B
ArmAsm
;
|
|
; 2002-11-15, Ullrich von Bassewitz
|
|
; 2019-11-08, Greg King
|
|
;
|
|
; Variables used for CBM file I/O
|
|
;
|
|
|
|
.export curunit
|
|
.constructor initcurunit, 30
|
|
.destructor updatedevnum, 30
|
|
|
|
.include "cx16.inc"
|
|
|
|
|
|
.segment "INIT"
|
|
|
|
curunit:
|
|
.res 1
|
|
|
|
|
|
.segment "ONCE"
|
|
|
|
.proc initcurunit
|
|
lda DEVNUM
|
|
bne L0
|
|
lda #8 ; Default is SD card
|
|
sta DEVNUM
|
|
L0: sta curunit
|
|
rts
|
|
.endproc
|
|
|
|
|
|
.code
|
|
|
|
.proc updatedevnum
|
|
lda curunit
|
|
sta DEVNUM
|
|
rts
|
|
.endproc
|