A LarKen disk drive is wonderful addition to anyone’s Timex/Sinclair 2068. It allows you to store many programs per diskette and to access them rapidly. On the down side, searching through many diskettes looking for a certain program by cataloguing each diskette and hunting or, after not using a diskette for a length of time, trying to remember what program “CCat3.B1” does can be a major headache. One solution to the problem is the T/S 2068 Disk Menu.
How Does The T/S 2068 Disk Menu Help?
Once you type in the T/S 2068 Disk Menu, (henceforth TSDM), and save it to each diskette TSDM:
- Becomes a permanent part of the diskette which cannot peal off and become lost,
- You can give a descriptive name to each program on the diskette and provide the USR address for machine code programs if they are not the same as the start address (See item “B” in the illustration),
- You can add, delete or modify descriptive names and program file names at will, and,
- TSDM will launch BASIC programs and load screens and machine code programs and display the start address and length of machine code programs if supplied.

How Does TSDM Work?
LL. 100-250
This section resets RAM_TOP — which is necessary if you launch TSDM using LarKen auto-start — and restores the data read pointer to the beginning of the data. Line 110 opens stream number four to the LarKen disk drive and opens stream number three to a line printer — which is usually an Epson compatible printer. Line 210 prints the banner and line 230 is a DATA statement in which to record the diskette title.
LL. 300-399
These are DATA statements in which you enter the descriptive name for each program you wish to load. There is room on the screen to have twelve one-line descriptive names which are lettered from “A” through to “L”. (If you have more than twelve entries, then save several copies of TSDM with slightly different file names — e.g. Menu.B2, Menu.B3, etc. — and use the current menu to chain to the previous menu or the next menu.) The program letters must be assigned in order and be the last element in the descriptive name. The reason for this will become clear as we proceed. Line 399 is special because it contains the signal “***” which tells TSDM to stop reading in data. If your modify this line for any reason, be sure not to remove the data element “***”.
LL. 400-410
These lines read in and display the data in lines 300 to 399 in alternating bands of black ink on white paper and black ink on yellow paper and stops when the signal “***” is read.
LL. 440-470
At this point TSDM switches to cap-lock mode and you are requested to make a selection or type in the command “QU” or “CAT”. “QU” stops TSDM. “CAT” executes the LarKen DOS catalogue command which lists the contents of the diskette to the screen. TSDM will pause indefinitely until a key is hit at which time TSDM runs itself again. TSDM will continue to loop until you enter your selection.
LL. 480-640
If a single letter is selected then TSDM switches off the cap-lock mode, the data read pointer is set to line 500 and the loop beginning at line 610 begins reading data starting from line 500 until it reaches the line containing the data required to load the selected program. If at this point TSDM encounters the stop sign “***” then the message “Select Again!” is displayed and TSDM will re-run after a short pause.
Lines 500 to 499 work in much the same manner as lines 300-399 except here is where TSDM finds the data required to load your selection.
Each DATA statement must have three elements:
- a properly formatted LarKen file name,
- a program start address, and,
- a program length address.
Note that the program file names must be entered same order as the descriptive names.
For a BASIC program, enter zeros for both the start address element and the program length element as shown below.
DATA "Tmenu.B1",0,0
For machine code programs, you can do as for BASIC programs as stated above. This is how you would load a normally saved screen dump, (i.e. SCREEN$).
If, however, the machine code program must be loaded at an address other than where it was saved from then you have enter the start address and the program length into the DATA statement thus:
DATA "Epmdos.C1", 63488, 2047
If you do not know the program length put zero as the last element and the program in its entirety will be loaded at the start address provided.
LL. 650-8999
Once TSDM has the load data, it uses the unique LarKen extensions to determine if it is to load a BASIC program or a machine code program. If “B” is the penultimate letter in the program file name, the TSDM proceeds to load the file as a BASIC file. The alternative extension begins with “C”. If a “C” extension is not found then TSDM displays the error message “File type error in file”, displays the file name and stops. If a “C” extension is present, TSDM then looks at the start and length data stored in the variables “l” and “s” to determine which of the three methods will be used to load the program. If the start address and length elements are other than zero, they are displayed before the program is loaded.
LL. 9000-9920
This is the location of the program save routine for TSDM.
Will TSDM Work With A ZX Spectrum Emulator ROM?
Yes, it will work when LarKen DOS is being run on a T/S 2068 using a ZX Spectrum Emulator ROM, however, you need to replace line 458 with:
458 IF a$="CAT" THEN CLS : PRINT #4: CAT: PRINT "Hit any key to restart": PAUSE 0: RUN
Once this is done, TSDM will run perfectly.
What About The ZX Microdrive?
I have successfully used TSDM on a ZX Microdrive. It is a matter of removing line 110, all the references to PRINT #4, and modify the CAT command, (line 458) and all the SAVE & LOAD commands to the appropriate Microdrive commands. If you save all your programs to the stringy floppy using LarKen file naming conventions then TSDM has no trouble locating and running them. The only possible problem is if you have more than one microdrive. Then you have to look into some means of accounting for the drive number – which I will leave for you, dear readers, or as the topic of another article.
David Solly, Ottawa, Canada, January 10, 2000.
Program Listing
1 REM LarKen Disk Menu
2 REM Program by David Solly
3 REM Ottawa, Ontario
4 REM 9 July 1987
5 REM Updated & Annotated 1 January 2000
100 CLEAR 65535: RESTORE: REM Reset Ram_Top & Restore data
105 REM Open a stream to the LarKen disk drive and one to the line printer.
106 REM Both commands are LarKen DOS specific
110 RANDOMIZE USR 100: OPEN #4,"dd": PRINT #4: OPEN #3,"lp"
120 BORDER 7: INK 0: PAPER 7
210 PRINT ' PAPER 1; INK 7;" T/S 2068 Disk Menu "
220 PRINT '"Disk Name: ";
230 DATA "Tool Box #3"
240 READ n$: PRINT n$
250 PRINT ' INVERSE 1;"Program"; INVERSE 0;TAB 26; INVERSE 1;"Select": PRINT
299 REM Descriptive file name start here
300 DATA "TTSUG Utilities Menu A"
302 DATA "Screen Copier 64207 B"
304 DATA "Gorilla Screen Expander-Copier C"
306 DATA "Pixel Fix D"
308 DATA "Screen Save/Recall E"
310 DATA "Character Set Analysis F"
312 DATA "Line List Plus (Line 9900) G"
314 DATA "Graphics Replacement H"
316 DATA "Desk Top Publisher I"
318 DATA "Copy Cat III Tape Copier J"
320 DATA "Program Delete K"
322 DATA "Dos 63488 L"
399 DATA " ","Hit enter to repeat list ","QU = Quit; CAT = Catalogue Disk ","***": REM Do not touch!
400 READ n$: IF n$<>"***" THEN PRINT n$( TO LEN n$-1);TAB 31;n$(LEN n$): GO TO 410
405 GO TO 440
410 READ n$: IF n$<>"***" THEN PRINT ; PAPER 6;n$( TO LEN n$-1);TAB 31;n$(LEN n$): GO TO 400
440 POKE 23658,8: REM Force caps-lock mode
450 INPUT " Select Letter and Enter "; LINE a$
455 IF a$="QU" THEN POKE 23658,0: STOP
458 IF a$="CAT" THEN CLS : PRINT #4: CAT "",: PRINT '"Hit any key to restart": PAUSE 0: RUN
460 IF a$="" THEN RUN
465 REM *** Select The File Module
470 IF CODE a$<CODE "A" OR CODE a$>CODE "Z" THEN GO TO 440
480 POKE 23658,0: RESTORE 500: REM Release the caps-lock mode, reset data
490 REM Real program data starts here
500 DATA "Tmenu.B1",0,0
502 DATA "Copal.C1",64207,1130
504 DATA "Pander.B1",0,0
506 DATA "Pix.B1",0,0
508 DATA "Dump.B1",0,0
510 DATA "ChaA.B1",0,0
512 DATA "Llist+.B1",0,0
514 DATA "Grep.B1",0,0
516 DATA "DeskPL.BD",0,0
518 DATA "CCat3.B1",0,0
520 DATA "ProDel.B1",0,0
522 DATA "Epmdos.C1",63488,2047
599 DATA "***",0,0: REM Do not touch!
600 LET n$="": LET s=0: LET l=0
610 FOR i=CODE "A" TO CODE a$
620 READ n$,s,l: REM Read in the file name, start address and number of bytes
630 IF n$="***" THEN PRINT 'TAB 10; FLASH 1;"Select Again!": PAUSE 100: RUN
640 NEXT i: CLS
654 REM *** Run the BASIC Program Module
650 IF n$(LEN n$-1)="B" THEN PRINT #4: LOAD n$
660 IF n$(LEN n$-1)<>"C" THEN CLS : PRINT "File type error in file: ";n$: STOP
665 REM *** Load the machine code/screen and print the start address and length of code.
670 IF s=0 AND l=0 THEN PRINT #4: LOAD n$CODE
675 IF s<>0 THEN PRINT "Code located at address: ";s: IF l<>0 THEN PRINT "to address: ";s+l
680 IF s<>0 AND l=0 THEN PRINT #4: LOAD n$CODE s
690 IF s<>0 AND l<>0 THEN PRINT #4: LOAD n$CODE s,l
8999 STOP
9000 REM *** Save routine
9010 PRINT #4: SAVE "Menu.B1" LINE 1
9020 RUN