added protection against DOS memory damage

This commit is contained in:
FeralChild64 committed 2020-08-23 15:43:04 +02:00
1 parent 56b9571b62
commit 4f417d714e
3 files changed
+49 -3

No files matched your search

+18
View File
@@ -5,6 +5,20 @@
dos_INIT:
// Set the magic string 'CBDOS'
phx
ldx #$04
!:
lda dos_magicstr, x
sta MAGICSTR, x
dex
bpl !-
plx
// Set default device numbers
lda #CONFIG_UNIT_SDCARD
sta UNIT_SDCARD
lda #CONFIG_UNIT_FLOPPY
@@ -15,3 +29,7 @@ dos_INIT:
// XXX initialize drivers, etc.
rts
dos_magicstr: // 'CBDOS'
.byte $43, $42, $44, $4F, $53