From a642e05c2c416df6857b4c5a3025af09c9e2f669 Mon Sep 17 00:00:00 2001 From: Gale Faraday Date: Wed, 11 Dec 2024 06:35:11 -0600 Subject: [PATCH] feat: ported ROBIT-2 for MIKBUG to CHIBI PC-09 --- code/boot/src/boot.s | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/code/boot/src/boot.s b/code/boot/src/boot.s index 6c563b0..56ee1ee 100644 --- a/code/boot/src/boot.s +++ b/code/boot/src/boot.s @@ -68,6 +68,38 @@ OUTSTR 2 ; Jump point for end of routine rts + SECTION "Memtest" + +; RAM testing routine. Ported to 6809 from 6800, based on source for ROBIT-2 for +; MIKBUG. +RAMTEST + ldx #SRAM_BASE ; Store 1 in memory + lda #1 + sta 0,x + cmpa 0,x + bne 1F +1 ; Loop point for next + asla ; Shift A and [X] left + asl 0,x + cmpa 0,x + bne 1F + cmpa #$80 ; Only test up to $80 + bne 1B + bra 2F +1 ; Write out error indicator + ldb #'X + jsr OUTCHAR + bra 3F ; Branch to finish +2 + cmpx #$60FF ; Compare X to end of RAM + beq 3F ; Finish if done, else try next address + leax 1,x + bra RAMTEST +3 + ldb #'P + jsr OUTCHAR + rts + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Interrupt and Reset Vectors