From a7a9404bdd7c1189f0ffdde3f733da00b6bf8e5a Mon Sep 17 00:00:00 2001 From: Gale Faraday Date: Wed, 15 Oct 2025 16:35:27 -0500 Subject: [PATCH] feat(memtest): tidied memtest --- src/memtest.s | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/memtest.s b/src/memtest.s index 120a60b..5538de6 100644 --- a/src/memtest.s +++ b/src/memtest.s @@ -9,15 +9,18 @@ ;; ;; Memory Testing Routines ;; +;; This family of BIOS routines does not return, upon completion the CHIBI must +;; be reset. +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SECTION MEMTEST - EXPORT RAMTEST + EXPORT ROBIT ; RAM testing routine. Ported to 6809 from 6800, based on source for ROBIT-2 for ; MIKBUG. -RAMTEST +ROBIT ldx #STACK_TOP+1 ; bottom of testable SRAM, $0200 AGAIN@ ; Store 1 in memory lda #1 ; Set [X] to 1 @@ -41,4 +44,17 @@ ERR@ ; Write out error indicator PASS@ ; Pass test ldb #'P jsr POUTCHAR - rts + bra HALT + +; Prints a message about completing a memory test prompting the user to reset +; then puts the MPU in a loop where it only responds to interrupts, effectively +; halting the CHIBI +HALT + PZSTR MSG_FINISH +LOOP@ + sync + bra LOOP@ + +MSG_FINISH + fcc "Memory test finished! Please reset" + fcb $0D,$0A,$00