rework for the initial CBDOS

This commit is contained in:
FeralChild64 committed 2021-02-03 16:05:07 +01:00
1 parent 82729bb621
commit 92d1ad0177
13 files changed
+349 -85

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
;
; Unit number handling. For detailed description see 'm65dos_bridge.s' file
;
dos_UNITNUM:
; Check if memory content is not damaged
jsr dos_MEMCHK
bcs dos_UNITNUM_none
; Check what kind of device was requested
cmp #$00
beq dos_UNITNUM_sdcard
cmp #$01
beq dos_UNITNUM_floppy
cmp #$02
beq dos_UNITNUM_ramdisk
lda #$00
; FALLTROUGH
dos_UNITNUM_none:
sec
rts
dos_UNITNUM_sdcard:
lda UNIT_SDCARD
+skip_2_bytes_trash_nvz
dos_UNITNUM_floppy:
lda UNIT_FLOPPY
+skip_2_bytes_trash_nvz
dos_UNITNUM_ramdisk:
lda UNIT_RAMDISK
cmp #$00
beq dos_UNITNUM_none
clc
rts