A memory viewer for the ZX80. Enter a four-digit hex address and it lists 16 bytes from there, each with its address in hex, the byte in hex and decimal, and the character it stands for. Enter another address to look elsewhere.
Addresses must have four hex digits, up to 7FEF; non-hex input is ignored. The article suggests 40AA to see the program’s own lines 120 and 130.
Published in Syntax January 1981 (Memory Window).
Source Code
10 CLEAR
20 DIM A(3)
30 DIM B(3)
40 LET C=0
50 INPUT H$
60 CLS
70 FOR J=0 TO 3
80 IF CODE(H$)<28 THEN GO TO 10
90 IF CODE(H$)>43 THEN GO TO 10
100 LET C=C+(CODE(H$)-28)*(16**(3-J))
110 LET H$=TL$(H$)
120 NEXT J
130 FOR I=0 TO 15
140 LET D=C
150 LET E=PEEK(D)
160 LET F=E
170 FOR J=0 TO 3
180 LET A(J)=D/(16**(3-J))
190 LET D=D-(16**(3-J)*A(J))
200 LET B(J)=F/(16**(3-J))
210 LET F=F-(16**(3-J)*B(J))
220 NEXT J
230 LET C=C+1
240 FOR J=0 TO 3
250 PRINT CHR$(A(J)+28);
260 NEXT J
270 PRINT,
280 FOR J=2 TO 3
290 PRINT CHR$(B(J)+28);
300 NEXT J
310 PRINT ,E,
320 PRINT CHR$(E)
330 NEXT I
340 GO TO 10Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
