Memscan

Author(s): Russell English
Publication: ZX-Appeal
Date: September 1986
Pages: 11

This is a short machine code routine that displays a memory map of the computer. It is 2068 specific, but can easily be altered for the Spectrum with two pokes.

It works by scaning every other address, checking for zeros. If something other than a zero is found, it assumes that the address is being used and a point is plotted on the screen.

It is relocatable, called up with RANDOMIZE USR n, where n is the first address; overwrites the screen, ie, it does NOT clear the screen first; does not scan the last few bytes of memory; ignores the external ROM; is interactive with the display file(s).

To scan every byte in the first half of memory, POKE 65519,0. To scan every byte in the second half of memory, POKE 65502,128: POKE 65519, 0. For SPECTRUM, POKE 65515,229 : POKE 65516,34.

A title can be added to a display with: PRINT AT 1,10;”name”. The display may be compared to the memory map on p. 254 of the 2068 User Manual.

 10 FOR x=65500 TO 65533
20 READ y: POKE x,y
30 NEXT x
40 DATA 33,0,0,14,1
50 DATA 6,27,62,0,197
60 DATA 229,190,40,3,205
70 DATA 62,38,225,35,35
80 DATA 193,4,62,156,184
90 DATA 32,236,12,62,255
100 DATA 185,32,228,201
105 RANDOMIZE USR 65500
115 STOP
120 SAVE "Memscan"CODE 65500.34

SPECTRUM POKES: #1=229; #2=34

Memscan display with MTERM II loaded
Memscan display with MTERM II loaded

This program is reprinted from the June 1986 edition of TIMELINEZ – the joint newsletter of the three Timex-Sinclair User Groups in the San Francisco Bay area: EBZUG PUG SVSTUG

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