diff --git a/desktop/desktop_main.s b/desktop/desktop_main.s index e754337..9fcd2d9 100644 --- a/desktop/desktop_main.s +++ b/desktop/desktop_main.s @@ -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 diff --git a/macros.inc b/macros.inc index 04702cd..8f50d43 100644 --- a/macros.inc +++ b/macros.inc @@ -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 ;;; ============================================================