DeskTop: Check driver before reinstalling RAM

This commit is contained in:
Joshua Bell 2018-12-01 20:17:49 -08:00
parent d0b516eb2f
commit 53c96d201d
2 changed files with 10 additions and 1 deletions

View File

@ -2076,9 +2076,14 @@ start:
;; Restore machine to text state
sta ALTZPOFF
jsr exit_dhr_mode
;; S3D2 /RAM driver still in place?
RAMSLOT := DEVADR + $10 + 3*2 ; Slot 3, Drive 2
cmp16 RAMSLOT, NODEV
beq quit ; No, so give up
jsr reinstall_ram
jmp quit_code_addr
quit: jmp quit_code_addr
fail: jsr DESKTOP_SHOW_ALERT
rts

View File

@ -46,7 +46,11 @@ end:
;;; Pad with zeros to the given address
.macro PAD_TO addr
.if (addr - *) >= 0
.res addr - *, 0
.else
.error .sprintf("Padding offset %d", addr - *)
.endif
.endmacro
;;; ============================================================