Merge memory test and serial output routines #1

Merged
amberisvibin merged 9 commits from gfaraday/chibi-pc09:main into main 2025-08-22 11:36:25 -04:00
Showing only changes of commit a642e05c2c - Show all commits

View File

@@ -68,6 +68,38 @@ OUTSTR
2 ; Jump point for end of routine 2 ; Jump point for end of routine
rts 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 ;; Interrupt and Reset Vectors