--- title: "How Many Bytes to the Line?" id: 76463 type: "computer_media" slug: "how-many-bytes-to-the-line" url: "http://localhost/computer_media/how-many-bytes-to-the-line/" markdown_url: "http://localhost/computer_media/how-many-bytes-to-the-line.md" published_at: "2026-11-11T08:02:39+00:00" modified_at: "2026-11-11T08:02:39+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/how-many-bytes-to-the-line-1.png" excerpt: "A ZX80 utility that shows how much memory each program line uses." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "ZX80" slug: "zx80" taxonomy: "post_tag" url: "http://localhost/tag/zx80/" model: - name: "Sinclair ZX80" slug: "zx80" taxonomy: "model" url: "http://localhost/model/zx80/" indiv: - name: "Martin Irons (K2MI)" slug: "martin-irons-k2mi" taxonomy: "indiv" url: "http://localhost/indiv/martin-irons-k2mi/" genre: - name: "Utility" slug: "utility" taxonomy: "genre" url: "http://localhost/type/utility/" 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/How%20Many%20Bytes%20to%20the%20Line%20%281981%29%28Irons%2C%20Martin%20H.%29%28ZX80%29%28US%29%28Program%29.zip" mediadate: "1981" images: - url: "http://localhost/wp-content/uploads/2026/11/how-many-bytes-to-the-line-1.png" - url: "http://localhost/wp-content/uploads/2026/11/how-many-bytes-to-the-line-2.png" article_media: - id: 19233 title: "How Many Bytes to the Line?" type: "article" url: "http://localhost/article/how-many-bytes-to-the-line/" media_type_tags: "Utility" license: false --- # How Many Bytes to the Line? A ZX80 utility that shows how much memory each program line uses. Type your program in ahead of it (with lower line numbers and ending in STOP), then RUN 9200 and enter the starting address, 16426 for the first line. It lists each line with its start address, 15 to a screen; at the end it gives the number of lines, total bytes, average bytes per line and the next free address. Press NEWLINE for each new screen, and E to exit. On its own it analyzes itself. Published in Syntax January 1981 ([How Many Bytes to the Line?](https://timexsinclair.com/article/how-many-bytes-to-the-line/)). ## Source Code ``` 9200 REM DUMP INSTRUCTIONS 9205 PRINT "START AT?" 9210 INPUT S 9215 LET B=S 9220 LET C=0 9225 CLS 9230 FOR I=1 TO 15 9235 PRINT S, 9240 LET C=C+1 9245 IF PEEK(S)=118 THEN GO TO 9270 9250 PRINT CHR$(PEEK(S)); 9255 IF PEEK(S)=248 THEN GO TO 9310 9260 LET S=S+1 9265 GO TO 9245 9270 PRINT 9275 LET S=S+3 9280 NEXT I 9290 INPUT Z$ 9295 IF Z$="E" THEN GO TO 9390 9300 GO TO 9225 9310 PRINT 9315 PRINT 9320 PRINT C,"INSTRUCTIONS" 9325 LET A=S-B+1 9330 PRINT A,"BYTES" 9335 LET D=A/C 9340 PRINT D,"AVERAGE BYTES" 9345 LET S=S+4 9350 PRINT S,"NEXT PROGRAM" 9355 INPUT Z$ 9360 IF Z$="E" THEN GO TO 9390 9370 IF Z$="" THEN GO TO 9215 9375 GO TO 9205 9390 PRINT "END DUMP" 9392 GO TO 9399 9395 RETURN 9399 STOP ```