MEMTST

Developer(s): Ron Charlton
Date: 1983
Type: Program
Platform(s): ZX81, TS 1000
Tags: Utility

A memory tester for the ZX81. Before loading it, POKE 16388,0, POKE 16389,68 and NEW, so that RAMTOP and the machine stack sit in the first 1K. The program then writes 0 and 255 to every byte from 17408 to 32767 and reads each back. Any address that fails is printed with the value read and the value written; END means the memory passed.

A full run takes about four and a half minutes in FAST mode. The article explains how to turn the codes into hex and binary to find the bad bit, and suggests running it several times, since some faults show up only now and then.

Published in Syntax November 1983 (Memory Tester).

Related Articles

MEMTST writes all zeroes into a byte, confirms that all bits equal zero by reading the byte, writes all ones in the byte, confirms that bits are all ones by re-reading the byte, then moves to the next byte.

Image Gallery

Source Code

  10 REM "MEMTST"
  20 REM POKE 16388,0 AND POKE 16389,68 AND NEW THEN RUN THIS PROGRAM
  30 LET B=0
  40 LET C=255
  50 FOR A=17408 TO 32767
  60 POKE A,B
  70 IF (PEEK A)<>B THEN PRINT A,PEEK A;"  0"
  80 POKE A,C
  90 IF (PEEK A)<>C THEN PRINT A,PEEK A;"  255"
 100 NEXT A
 110 PRINT "END"

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.