--- title: "8K ROMCALLS" id: 76291 type: "computer_media" slug: "8k-romcalls" url: "http://localhost/computer_media/8k-romcalls/" markdown_url: "http://localhost/computer_media/8k-romcalls.md" published_at: "2026-11-11T08:03:15+00:00" modified_at: "2026-11-11T08:03:15+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/8k-romcalls-1.png" excerpt: "Scan the ZX81 ROM for every CALL instruction and list each called routine with the address that calls it." 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: "Martin Irons (K2MI)" slug: "martin-irons-k2mi" taxonomy: "indiv" url: "http://localhost/indiv/martin-irons-k2mi/" genre: - name: "Machine Language" slug: "machine-language" taxonomy: "genre" url: "http://localhost/type/machine-language/" media_type: "Program" programmers: - name: "Martin Irons (K2MI)" slug: "martin-irons-k2mi" taxonomy: "indiv" url: "http://localhost/indiv/martin-irons-k2mi/" download_url: "https://archive.org/download/timex-sinclair-software-archive/8K%20ROMCALLS%20%281983%29%28Irons%2C%20Martin%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1983" images: - url: "http://localhost/wp-content/uploads/2026/11/8k-romcalls-1.png" - url: "http://localhost/wp-content/uploads/2026/11/8k-romcalls-2.png" article_media: - id: 19571 title: "8K ROMCALLS" type: "article" url: "http://localhost/article/8k-romcalls/" media_type_tags: "Machine Language" license: false --- # 8K ROMCALLS Scans the 8K ROM up to address 7679 for the Z80 CALL instruction (code 205) and the conditional CALLs, builds a list of called and calling addresses, sorts it and displays it a screen at a time, with a count at the end. The scan and sort take about 20 minutes. Syntax counted 295 unconditional and 27 conditional calls. Run it once and SAVE it with the list; GOTO 1000 shows the list again, and GOTO 2000 LPRINTs it. The listing has Syntax’s modifications of December 1983, and the article gives a table of further changes for the Spectrum and TS2068 ROM. Published in Syntax December 1983 ([8K ROMCALLS](https://timexsinclair.com/article/8k-romcalls/)). ## Source Code ``` 1 REM THIS PROGRAM LISTS ALL CALLS IN 8K 0F ROM. 2 REM BY MARTY IRONS, K2MI, 46 MAGIC CIRCLE DR., GOSHEN. NY 10924 3 REM 5 MAY 1982 4 REM THIS PROGRAM TAKES ABOUT 20 MINUTES TO SCAN THE ROMSORT AND START TO PRINT 5 REM "GOTO 1000" TO LIST ALL CALLS, AFTER RUNNING IT AND SAVING IT. 6 REM MODIFIED BY SYNTAX DEC 83 10 DIM C$(400,10) 20 LET MAX=0 30 FAST 100 FOR I=0 TO 7679 110 LET V=PEEK I 120 IF V<196 THEN GOTO 290 130 IF V=205 THEN GOTO 200 140 IF V-8*(INT (V/8))<>4 THEN GOTO 290 200 REM TEST CALLED ADDRESS 205 LET V=PEEK (I+1)+256*PEEK (I+2) 210 IF V>7679 THEN GOTO 290 215 REM THIS IS A CALL 220 LET MAX=MAX+1 230 LET V$=STR$ (V)+(STR$ (I+100000))(2 TO 6) 240 IF LEN V$>9 THEN GOTO 270 250 LET V$="0"+V$ 260 GOTO 240 270 LET C$(MAX)=V$ 280 LET I=I+2 290 NEXT I 300 PRINT "SORTING ";MAX;" ENTRIES" 302 PAUSE 100 304 CLS 310 FOR I=1 TO MAX-1 320 LET P=I 330 FOR J=I+1 TO MAX 340 IF C$(J)3 THEN GOTO 1070 1030 INPUT Z$ 1040 CLS 1050 IF Z$<>"" THEN GOTO 9999 1060 GOSUB 500 1070 PRINT " ";C$(I,1 TO 5)," ";C$(I,6 TO 10) 1080 NEXT I 1200 PRINT 1210 PRINT " THERE ARE ";MAX;" CALLS" 1220 GOTO 9999 2000 REM IF YOU HAVE A PRINTER "GOTO 2000" TO PRINT ALL CALLS. 2010 LPRINT "CALLED ROUTINES IN ROM" 2020 LPRINT 2030 LPRINT "CALLED ADDR","CALLING ADDR" 2040 LPRINT 2050 FOR I=1 TO MAX 2060 LPRINT " ";C$(I,1 TO 5)," ";C$(I,6 TO 10) 2070 NEXT I 9999 STOP ```