The listing “DISK MENU”,written by Bob Mitchell, will be found useful when used with the AUTOSTART feature of the LARKEN system. With minor modifications it can be used with either Spectrum or TS2068 program disks.
Lets look particularly at the make-up of LINE 3:
LINE 3 is used to SAVE the program to disk. The BORDER, PAPER, and INK controls are to provide for a darkened screen during the loading process. LINE 3 also clears RAMtop down to just above the program, to minimize the number of tracks used by the AUTOSTART feature. Although the listing shows a figure of 25500, you should alter this to suit your particular application. For example, if your system (LKDOS) saves 1960 bytes per track a suitable number would be 26400 for a Spectrum menu, and 30000 for a TS2068 menu. The “autostart” program would then occupy 2 disk tracks if the menu was being used in the TS2068 Spectrum mode and 4 tracks if used in the normal TS2068 mode.
For a system which saves 5120 bytes to a track (i.e. DSK400) figures of 27600 and 32000 might be appropriate (using 1 and 2 tracks respectively).
If your “autostart” program is too long for these RAMtop figures of course you can increase them.
RANDOMIZE USR 102 initiates the “autostart” SAVE. After entering GOTO 3 and hearing the melody sequence you press the “D” key to complete the SAVE sequence.
The balance of the program is pretty straight-forward and will provide a very attractive menu screen; one which you can easily customise to suit your program loading information.
1 REM DISK MENU
2 GO TO 4
3 CLEAR 25500: BORDER 0: PAPER 0: INK 0: CLS : RANDOMIZE USR 102
4 PRINT USR 100: OPEN #4,"dd"
5 BORDER 1: INK 7: PAPER 0: CLS
6 PRINT AT 1,2; PAPER 2;" LARKEN DISK MENU "
8 POKE 23658,8: LET x=8
9 RESTORE 100
10 FOR n=1 TO x
20 READ a$: PRINT " ";CHR$ (n+64);" - ";a$
25 PRINT
30 NEXT n
34 INK 4
35 PLOT INK 4;0,0: DRAW 255,0: DRAW 0,175: DRAW -255,0: DRAW 0,-175: PLOT 1,1: DRAW 253,0: DRAW 0,173: DRAW -253,0: DRAW 0,-173: INK 7
38 PLOT 9,20: DRAW 237,0: DRAW 0,135: DRAW -237,0: DRAW 0,-135
50 PRINT AT 20,1; PAPER 2;" "; FLASH 1;"Press A to ";CHR$ (x+64);" only"; FLASH 0;" "
70 LET n$=INKEY$
80 IF n$<"A" OR n$>CHR$ (x+64) THEN GO TO 70
85 BORDER 0: PAPER 0: INK 7: CLS
90 GO TO (CODE n$-64)*200
100 DATA "Program Name ","Next program name ","and so on.... "," "," "," "," "," "
160 GO TO 1
200 PRINT #4: LOAD "NMI-S1.CM.C1"CODE
400 PRINT #4: LOAD "Progrm.B1"
600 PRINT AT 10,1;"Press any key to start"
610 PRINT #4: LOAD "Progrm.B1"
800 PRINT AT 10,0;"Press any key to start"
810 PRINT #4: LOAD "Progrm.C1"CODE
1000 PRINT #4: LOAD "Progrm.C1"CODE
1010 RANDOMIZE USR 54016
1020 GO TO 1
1200 PRINT AT 10,0;"Press key A, B, C, or D to start"
1210 PRINT #4: LOAD "NMI-S1.C1"CODE
1400 PRINT #4: LOAD ".C1"CODE
1600 PRINT AT 10,0;"Press ENTER key to start"
1610 PRINT #4: LOAD ".C1"CODE
Media
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.