--- title: "MEMTST" id: 76526 type: "computer_media" slug: "memtst" url: "http://localhost/computer_media/memtst/" markdown_url: "http://localhost/computer_media/memtst.md" published_at: "2026-11-11T08:02:37+00:00" modified_at: "2026-11-11T08:02:37+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/memtst-1.png" excerpt: "Test the RAM of a 16K ZX81 byte by byte, writing and reading all zeros and all ones, and list any bad addresses." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Ron Charlton" slug: "ron-charlton" taxonomy: "indiv" url: "http://localhost/indiv/ron-charlton/" genre: - name: "Utility" slug: "utility" taxonomy: "genre" url: "http://localhost/type/utility/" media_type: "Program" programmers: - name: "Ron Charlton" slug: "ron-charlton" taxonomy: "indiv" url: "http://localhost/indiv/ron-charlton/" download_url: "https://archive.org/download/timex-sinclair-software-archive/MEMTST%20%281983%29%28Charlton%2C%20Ron%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1983" images: - url: "http://localhost/wp-content/uploads/2026/11/memtst-1.png" article_media: - id: 19597 title: "Memory Tester" type: "article" url: "http://localhost/article/memory-tester/" media_type_tags: "Utility" license: false --- # MEMTST 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](https://timexsinclair.com/article/memory-tester/)). ## 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" ```