fixed memory damage in CBDOS

This commit is contained in:
FeralChild64 committed 2021-02-15 21:13:23 +01:00
1 parent 86d91e224c
commit 992829c60a
4 files changed
+23 -15

No files matched your search

+7
View File
@@ -6,6 +6,9 @@
dos_MEMCHK:
pha
phx
; Check for magic string
ldx #$04
@@ -34,10 +37,14 @@ dos_MEMCHK:
cmp code_RTS_03
bne @fail
plx
pla
clc
rts
@fail:
plx
pla
sec
rts
+5 -5
View File
@@ -6,13 +6,13 @@
dos_UNITCHK:
jsr dos_ENTER
; Check if memory content is not damaged
; Before the start make sure memory content is not damaged
jsr dos_MEMCHK
bcs dos_UNITCHK_fail
lda REG_A
bcc @ok
rts
@ok:
jsr dos_ENTER
; Check for unit
+6 -5
View File
@@ -6,13 +6,14 @@
dos_UNITNUM:
jsr dos_ENTER
; Check if memory content is not damaged
; Before the start make sure memory content is not damaged
jsr dos_MEMCHK
bcs dos_UNITNUM_fail
lda REG_A
bcc @ok
lda #$00 ; failure
rts
@ok:
jsr dos_ENTER
; Check what kind of device was requested
+5 -5
View File
@@ -6,14 +6,14 @@
dos_UNITSET:
jsr dos_ENTER
; Check if memory content is not damaged
; Before the start make sure memory content is not damaged
jsr dos_MEMCHK
bcc @1
bcc @ok
rts
@1:
@ok:
jsr dos_ENTER
; XXX do not allow illegal device numbers... above 30 or below 8 ?
; Check what kind of device was requested