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