--- title: "LLIST Program" id: 81054 type: "computer_media" slug: "llist-program" url: "http://localhost/computer_media/llist-program/" markdown_url: "http://localhost/computer_media/llist-program.md" published_at: "2026-11-26T23:09:38+00:00" modified_at: "2026-11-26T23:09:38+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/llist-program-1.png" excerpt: "LLIST chosen lines of a TS2068 program to any printer as plain ASCII." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "William J. Pedersen" slug: "william-j-pedersen" taxonomy: "indiv" url: "http://localhost/indiv/william-j-pedersen/" genre: - name: "Printer" slug: "printer" taxonomy: "genre" url: "http://localhost/type/printer/" media_type: "Program" programmers: - name: "William J. Pedersen" slug: "william-j-pedersen" taxonomy: "indiv" url: "http://localhost/indiv/william-j-pedersen/" download_url: "https://archive.org/download/timex-sinclair-software-archive/LLIST%20Program%20%281987%29%28Pedersen%2C%20William%20J.%29%28TS2068%29%28US%29%28Program%29.zip" mediadate: "1987" images: - url: "http://localhost/wp-content/uploads/2026/11/llist-program-1.png" - url: "http://localhost/wp-content/uploads/2026/11/llist-program-2.png" article_media: - id: 43267 title: "Listing On Your Printer" type: "article" url: "http://localhost/article/listing-on-your-printer/" media_type_tags: "Printer" license: false --- # LLIST Program LLISTs any lines of a BASIC program to a full-size printer as plain ASCII. Keywords come out as their text, colour codes and the hidden five-byte numbers are left out, and characters no ordinary printer has (graphics, UDGs) print as ?. It can list a single line, a range, or several ranges one after another, and leave itself out of the listing. MERGE it with your program and GO TO 7900. Give the first and last line numbers of a range; each line is shown on the screen and printed; answer Y to Another section? for more. Set margin, Wide (characters per line) in line 7900 and wq in line 7910 to suit the printer (the article suggests margin 0 or 15 with Wide 32, or margin 10, Wide 64 and wq=1 for statements indented after each colon). The program only depends on wk in line 7900, so it can be moved to other line numbers. It prints a form feed every 58 lines. Written by William Pederson (as printed) and first published in TIMELINEZ, February 1987. Lines 7900 and 7901 are corrected as the article’s editor’s note says: the bracket and ? printed there are the TS2068 tokens ON ERR and ON ERR RESET, which this program itself prints as { and ?. Published in The Plotter March 1988 ([Listing On Your Printer](https://timexsinclair.com/article/listing-on-your-printer/)). ## Source Code ``` 7900 LET wk=7900: LET margin=4: LET Wide=32: LET w1n=2:ON ERR GO TO wk+19: DIM A$(margin) 7901 ON ERR RESET : INPUT PAPER 5;" LLIST "; PAPER 7'"From LINE: ";wfirst;" to ";wlast 7902 LET wa=PEEK 23635+256*PEEK 23636 7903 LET wn=256*PEEK wa+PEEK (wa+1): LET w1=PEEK (wa+2)+256*PEEK (wa+3): IF wnwlast THEN GO TO wk+17 7905 CLS : PRINT TAB 4-LEN STR$ wn;wn;" ";: FOR n=wa+4 TO wa+w1+2: LET w=PEEK (n): IF w=14 THEN LET n=n+5: GO TO wk+9 7906 IF w>15 AND w<22 THEN LET n=n+1: GO TO wk+9 7907 IF w>126 AND w<165 THEN LET w=63 7908 PRINT CHR$ w; 7909 NEXT n: LET wz=800-PEEK 23688-32*PEEK 23689: PRINT PAPER 5;" ";wz+1; 7910 LET wq=0: GO SUB wk+15: FOR n=0 TO wz: LET j=INT (n/32): LET k=n-32*j: LET L$=SCREEN$ (j,k): IF L$=":" AND wq>0 THEN LPRINT CHR$ 13;: GO SUB wk+15: LPRINT " ";: LET wc=5 7911 LPRINT L$;: LET wc=wc+1: IF L$="""" THEN LET wq=-wq 7912 IF wc>Wide THEN LPRINT CHR$ 13;: GO SUB wk+15 7913 NEXT n: LPRINT 7914 LET wa=wa+w1+4: GO TO wk+3 7915 LPRINT A$;: LET w1n=w1n+1: LET wc=1: IF w1n>58 THEN LET w1n=0: LPRINT CHR$ 12;: GO TO wk+15 7916 RETURN 7917 INPUT "Another section? Yes or No: "'L$: IF LEN L$ THEN IF L$(1)="Y" OR L$(1)="y" THEN GO TO wk+1 7918 STOP : GO TO wk 7919 LET A$="": GO TO wk+1 ```