--- title: "CALL-to-Print Routine" id: 77305 type: "computer_media" slug: "call-to-print-routine" url: "http://localhost/computer_media/call-to-print-routine/" markdown_url: "http://localhost/computer_media/call-to-print-routine.md" published_at: "2026-11-15T18:39:11+00:00" modified_at: "2026-11-15T18:39:11+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/call-to-print-routine-1.png" excerpt: "A machine-code routine that prints the text stored right after its own CALL, by popping the return address." 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: "K. Van Vliet" slug: "k-van-vliet" taxonomy: "indiv" url: "http://localhost/indiv/k-van-vliet/" genre: - name: "Machine Language" slug: "machine-language" taxonomy: "genre" url: "http://localhost/type/machine-language/" media_type: "Program" programmers: - name: "K. Van Vliet" slug: "k-van-vliet" taxonomy: "indiv" url: "http://localhost/indiv/k-van-vliet/" download_url: "https://archive.org/download/timex-sinclair-software-archive/CALL-to-Print%20Routine%20%281984%29%28Van%20Vliet%2C%20K.%29%28TS1000%29%28CA%29%28Program%29.zip" mediadate: "1984" images: - url: "http://localhost/wp-content/uploads/2026/11/call-to-print-routine-1.png" - url: "http://localhost/wp-content/uploads/2026/11/call-to-print-routine-2.png" - url: "http://localhost/wp-content/uploads/2026/11/call-to-print-routine-3.png" article_media: - id: 40071 title: "A Machine Code Program with 1 Pop" type: "article" url: "http://localhost/article/a-machine-code-program-with-1-pop/" media_type_tags: "Machine Language" license: false --- # CALL-to-Print Routine A short machine-code demonstration: a routine called with CALL takes its own return address off the stack (one POP) and prints the text stored right after the CALL, stopping at an inverse space. Here the text is the author’s name, K. VAN VLIET. Type RUN and enter the 25 decimal values at the INPUT prompts, as the article says, or type GOTO 70 to see it work straight away: the download already holds the bytes in the line 1 REM. Lines 100 and 110 then POKE NEWLINE characters into the text, so the second call prints the name on three lines. Published in Sinc-Link July 1984 ([A Machine Code Program with 1 Pop](https://timexsinclair.com/article/a-machine-code-program-with-1-pop/)). ## Source Code ``` 1 REM ...25 characters minimum... 10 FOR I = 16514 TO 16538 20 PRINT I;" "; 30 INPUT N 40 PRINT N 50 POKE I,N 60 NEXT I 70 CLS 80 PRINT AT 5,0;"inverse space" 90 RAND USR 16523 100 POKE 16528,118 110 POKE 16532,118 120 PRINT AT 10,0;"inverse space" 130 RAND USR 16523 140 STOP ```