4 ld c, $51 ; Note that we are alive.
22 db $0D,$0A,$1B,"[1mFPGABoy Diagnostic ROM",$1B,"[0m",$0D,$0A,0
24 ; Memory tester: writes h ^ l to all addresses from C000 to DF80.
29 ld hl, $C000 ; Write loop
41 ld hl, $C000 ; Read loop
57 ld hl, testokstr ; Say we're OK
60 .memfail: ; Say we failed (sadface)
61 ; decrement hl the easy way
77 db "Testing memory from $C000 to $DF80...",0
81 db " Test failed at $",0
83 puthex: ; Put two hex nibbles to the serial console.
102 ; Wait for switches to be flipped on and off again.
124 db "Diagnostic ROM complete; flip switches to nonzero and then to zero to reset.",$0D,$0A,0
126 ; Core instruction basic acceptance tests.
199 db "Testing instructions... ",0
215 db " test failed.",$0D,$0A,0
219 ; Serial port manipulation functions.