nbla000,
I've quick-glued together a test program. It first fills a complete block with one of the values 0..255, and then checks whether the block has retained this value. If the check fails, the border changes from green to red, and the offending address is displayed.
This is still more a less a static test. It only checks, that all addresses can hold all their possible values over a prolonged period. There are also other ways RAM can fail, for example a location that changes its value, even though another location has been addressed. For this, a more complicated test is needed.
The program checks BLK1. For BLK2, BLK3, and BLK5, change both occurences of the value
32 to
64,
96, and
160, respectively.
1 POKE55,0:POKE56,32:CLR:FORT=673TO733:READA:POKET,A:NEXT
2 DATA169,29,141,15,144,169,0,133,251,133,252,168,169,
32,133,253
3 DATA162,32,165,251,145,252,200,208,251,230,253,202,208,246
4 DATA169,
32,133,253,162,32,165,251,209,252,208,13,200,208,249
5 DATA230,253,202,208,244,230,251,208,214,96,169,26,141,15,144,96
6 SYS673
7 IFPEEK(36879)=26THENPRINT"ADDRESS"PEEK(782)+256*PEEK(253)"FAILED!"
Here's the source:
Code: Select all
02a1 A9 1D LDA #$1D
02a3 8D 0F 90 STA $900F
02a6 A9 00 LDA #$00
02a8 85 FB STA $FB
02aa 85 FC STA $FC
02ac A8 TAY
02ad A9 61 LDA #$20
02af 85 FD STA $FD
02b1 A2 20 LDX #$20
02b3 A5 FB LDA $FB
02b5 91 FC STA ($FC),Y
02b7 C8 INY
02b8 D0 FB BNE $02B5
02ba E6 FD INC $FD
02bc CA DEX
02bd D0 F6 BNE $02B5
02bf A9 61 LDA #$20
02c1 85 FD STA $FD
02c3 A2 20 LDX #$20
02c5 A5 FB LDA $FB
02c7 D1 FC CMP ($FC),Y
02c9 D0 0D BNE $02D8
02cb C8 INY
02cc D0 F9 BNE $02C7
02ce E6 FD INC $FD
02d0 CA DEX
02d1 D0 F4 BNE $02C7
02d3 E6 FB INC $FB
02d5 D0 D6 BNE $02AD
02d7 60 RTS
02d8 A9 1A LDA #$1A
02da 8D 0F 90 STA $900F
02dd 60 RTS
Michael