playground.darkbyte.sk

Place for ZX Spectrum freaks
It is currently Sun Nov 19, 2017 11:27 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Apr 25, 2016 9:05 pm 
Offline

Joined: Sun Oct 06, 2013 10:57 pm
Posts: 58
Napísal som si jednoduchý tester pamäte v BASICu (pôvodne pre inú platformu, ale všetko si prototypujem na Spectre) a keďže by sa to možno niekomu mohlo hodiť, tu je výpis. Len poznámka, riadok 10 určuje rozsah testovaných adries. Ideálne je testovať pamäť nad RAMTOPom (takže pred spustením dať CLEAR počiatočná adresa-1).

Code:
10 FOR f=30000 TO 65535
20 FOR v=0 TO 5
30 READ d
40 POKE a,d
50 LET test=PEEK a
60 IF test <>d THEN PRINT "Problem at";a
70 NEXT v
80 PRINT AT 0,0;a;" is OK"
90 RESTORE
100 NEXT a
1000 DATA 0,255,240,15,170,85


Top
 Profile  
 
PostPosted: Mon Apr 25, 2016 10:54 pm 
Offline

Joined: Mon Nov 25, 2013 10:11 pm
Posts: 298
Location: Bratislava
Moja verzia mem testu.
Okrem jednotlivych vadnych bitov (neschopnych pametat si stav) vie detekovat aj poruchy na adresovych vstupoch a akekolvek vnutorne pravouhle medzibitove "skraty".
Code:
    10 CLEAR 32767
    20 LET zac=32768
    30 LET kon=65535
    40 DIM b(3)
    50 LET b(1)=BIN 01001001
    60 LET b(2)=BIN 10010010
    70 LET b(3)=BIN 00100100
    80 FOR m=1 TO 3
    90 LET i=m
   100 FOR a=zac TO kon
   110 POKE a,b(i)
   120 LET i=i+1
   130 IF i>3 THEN LET i=1
   140 NEXT a
   150 LET i=m
   160 FOR a=zac TO kon
   170 IF PEEK a<>b(i) THEN PRINT "Error at ";a,b(i);"!=";PEEK a
   180 LET i=i+1
   190 IF i>3 THEN LET i=1
   200 NEXT a
   210 NEXT m
   220 PRINT "Ok"
Attachment:
Memtest2.TAP [437 Bytes]
Downloaded 119 times
Edit: Predtym som omylom uploadol ladiacu verziu, nahradil som to spravnou verziou.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group