--- title: "Examining Machine Code" id: 76428 type: "computer_media" slug: "examining-machine-code" url: "http://localhost/computer_media/examining-machine-code/" markdown_url: "http://localhost/computer_media/examining-machine-code.md" published_at: "2026-11-11T08:02:43+00:00" modified_at: "2026-11-11T08:02:43+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/examining-machine-code-1.png" excerpt: "Look at memory one address at a time and change bytes as you go, in decimal or, with the alternative lines, in hex." 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: "Nels Anderson" slug: "anderson-nels" taxonomy: "indiv" url: "http://localhost/indiv/anderson-nels/" genre: - name: "Machine Language" slug: "machine-language" taxonomy: "genre" url: "http://localhost/type/machine-language/" media_type: "Program" programmers: - name: "Nels Anderson" slug: "anderson-nels" taxonomy: "indiv" url: "http://localhost/indiv/anderson-nels/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Examining%20Machine%20Code%20%281983%29%28Anderson%2C%20Nels%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1983" images: - url: "http://localhost/wp-content/uploads/2026/11/examining-machine-code-1.png" - url: "http://localhost/wp-content/uploads/2026/11/examining-machine-code-2.png" article_media: - id: 19575 title: "Examining Machine Code" type: "article" url: "http://localhost/article/examining-machine-code/" media_type_tags: "Machine Language" license: false --- # Examining Machine Code A small memory editor for checking and changing machine code. Add it to the end of a program and GOTO 9500, or RUN it on its own. Give a starting address, and the program shows the address and its contents. Type a new value of up to three digits to POKE it (ENTER after fewer than three), ENTER to leave it alone, or / to go back to the previous address. Because it reads keys with INKEY$, use it in SLOW mode. BREAK stops it. The second listing replaces three lines to show and enter the bytes as two-digit hex numbers. The download has both versions. Published in Syntax December 1983 ([Examining Machine Code](https://timexsinclair.com/article/examining-machine-code/)). ## Source Code ``` 9500 PRINT "ADDRESS" 9510 INPUT ADR 9515 SCROLL 9520 PRINT ADR;" ";PEEK ADR;" "; 9525 LET NEW=0 9530 FOR I=1 TO 3 9535 IF INKEY$<>"" THEN GOTO 9535 9536 IF INKEY$="" THEN GOTO 9536 9540 LET X$=INKEY$ 9550 IF X$=CHR$ 118 AND I=1 THEN GOTO 9610 9560 IF X$=CHR$ 118 THEN GOTO 9600 9565 IF X$="/" THEN GOTO 9640 9566 PRINT X$; 9570 LET NEW=NEW*10+VAL X$ 9580 NEXT I 9600 POKE ADR,NEW 9610 SCROLL 9620 LET ADR=ADR+1 9630 GOTO 9520 9640 SCROLL 9650 LET ADR=ADR-1 9960 GOTO 9520 9520 PRINT ADR;" ";CHR$ (INT ((PEEK ADR)/16+28));CHR$ ((PEEK ADR)-16*INT ((PEEK ADR)/16)+28);" -"; 9530 FOR I=1 TO 2 9570 LET NEW=NEW*16+CODE X$-28 ```