feat(memtest): tidied memtest

This commit is contained in:
2025-10-15 16:35:27 -05:00
parent f227ae6db6
commit a7a9404bdd

View File

@@ -9,15 +9,18 @@
;; ;;
;; Memory Testing Routines ;; Memory Testing Routines
;; ;;
;; This family of BIOS routines does not return, upon completion the CHIBI must
;; be reset.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SECTION MEMTEST SECTION MEMTEST
EXPORT RAMTEST EXPORT ROBIT
; RAM testing routine. Ported to 6809 from 6800, based on source for ROBIT-2 for ; RAM testing routine. Ported to 6809 from 6800, based on source for ROBIT-2 for
; MIKBUG. ; MIKBUG.
RAMTEST ROBIT
ldx #STACK_TOP+1 ; bottom of testable SRAM, $0200 ldx #STACK_TOP+1 ; bottom of testable SRAM, $0200
AGAIN@ ; Store 1 in memory AGAIN@ ; Store 1 in memory
lda #1 ; Set [X] to 1 lda #1 ; Set [X] to 1
@@ -41,4 +44,17 @@ ERR@ ; Write out error indicator
PASS@ ; Pass test PASS@ ; Pass test
ldb #'P ldb #'P
jsr POUTCHAR 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