--- title: "Print a Disk Directory (dire.B1)" id: 77477 type: "computer_media" slug: "print-a-disk-directory-dire-b1" url: "http://localhost/computer_media/print-a-disk-directory-dire-b1/" markdown_url: "http://localhost/computer_media/print-a-disk-directory-dire-b1.md" published_at: "2026-11-15T18:38:17+00:00" modified_at: "2026-11-15T18:38:17+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Prints a Larken disk directory with date, disk number, file count and open tracks." post_tag: - name: "LKDOS" slug: "lkdos" taxonomy: "post_tag" url: "http://localhost/tag/lkdos/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Bob Mitchell" slug: "bob-mitchell" taxonomy: "indiv" url: "http://localhost/indiv/bob-mitchell/" genre: - name: "Printer" slug: "printer" taxonomy: "genre" url: "http://localhost/type/printer/" media_type: "Program" programmers: - name: "Bob Mitchell" slug: "bob-mitchell" taxonomy: "indiv" url: "http://localhost/indiv/bob-mitchell/" mediadate: "1987" article_media: - id: 42093 title: "Bob’s Notebook: Print a Disk Directory" type: "article" url: "http://localhost/article/bobs-notebook-24/" media_type_tags: "Printer" license: false --- # Print a Disk Directory (dire.B1) Prints a Larken disk directory to the screen or the printer, headed with a date and disk number, and adds the number of files and the number of open tracks counted from track 0, for a label to keep with the diskette. It can print a duplicate copy of each directory. Uses the LDOS48 routines (USR 48302, 48053, 48518) loaded from a Larken disk, so it needs the Larken disk system; there is no download. Published in Sinc-Link May-June 1987 ([Bob’s Notebook: Print a Disk Directory](https://timexsinclair.com/article/bobs-notebook-24/)). ## Source Code ``` 100 REM [illegible] 105 REM ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 110 OUT 84,64: RANDOMIZE USR 63488: REM save "dire.B1" 120 RANDOMIZE USR 63488: REM load "LDOS48.C5" 130 CLS 132 LET copy=0 135 INPUT "make dupes? y/n "' LINE i$ 136 IF i$="y" THEN LET dupe=1 137 IF i$<>"y" THEN LET dupe=0 140 INPUT "screen/printer? s/p "' LINE s$ 142 IF s$="s" THEN LET dupe=0 150 BEEP .1,10: INPUT "date (yymmdd)"' LINE d$ 152 PRINT : BEEP .1,10: INPUT "disk # "; LINE n$ 155 OPEN #2,s$ 160 PRINT d$ 165 IF s$="p" THEN PRINT 170 LET trac=50501 180 LET loadtrac=48053 190 LET prdir=48518 200 PRINT AT 3,0;: POKE trac,0 210 RANDOMIZE USR 48302 220 RANDOMIZE USR loadtrac 230 RANDOMIZE USR 81 240 RANDOMIZE USR prdir 245 IF copy THEN GO TO 280 250 LET tot=0: FOR i=50589 TO 50667 255 IF PEEK i<128 THEN LET tot=tot+1 260 NEXT i 270 LET file=0: FOR i=50679 TO 52527 STEP 34 275 IF PEEK i<>249 THEN LET file=file+1 277 NEXT i 280 PRINT ''"NUM OF FILES: ";file 285 PRINT '"TRACKS OPEN: ";tot 295 IF copy THEN LET copy=0 320 PRINT ' INVERSE 1;"disk# ";n$ 330 IF s$="p" THEN PRINT '"▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒" 340 IF s$="p" THEN PRINT '''"▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒" 350 IF dupe THEN LET dupe=0: LET copy=1: GO TO 160 360 PRINT #0;"Press break or insert a new disk" 370 CLOSE #2: PAUSE 0: GO TO 130 ```