LOADER CATs the disk in the current drive and then runs a select bar over the catalogue on the screen. ENTER moves the bar, which alternates between the two columns of the Larken catalogue and wraps back to the top; SPACE loads the highlighted file; X CATs the disk again. If the catalogue fills the screen and the scroll? prompt appears, BREAK stops the listing so a file on the current page can be picked. The bar colours and keys can be changed in the listing.
It is the first Mike’s Notebook column by Michael J. DiRienzo, dated February 1990 and published on the March 1990 RMG UPDATES disk. The column says the CAT and LOAD statements in lines 30 and 150 can be changed to suit any disk system; as printed they are for the Larken (LKDOS) system, and DiRienzo saved the program as his AUTOSTART file. The same column was reprinted in several newsletters (see the related articles).
Program Analysis
How it works
- Line 20 sets
ON ERR GO TO 40, so BREAK at thescroll?prompt (an error) drops into the select loop rather than stopping the program. - Lines 50–70 step the bar down the screen, calling the subroutine at 160 once for columns 0–9 and once for 16–25 on each line.
- Lines 160–210 print a 10-character bar (
C$, a DIMmed string of spaces) withOVER 1, wait for a key, erase the bar the same way and act on X or SPACE. - Lines 80–130 read the highlighted name back from the screen one character at a time with
SCREEN$ (L,C)and trim trailing spaces; line 150 loads it.
Notable Techniques
SCREEN$reads the file name straight off the catalogue display, so nothing is typed.- Printing the bar twice with
OVER 1highlights and then restores the text underneath. ON ERR(a TS2068 statement) turns BREAK into a way to leave the catalogue listing.
Potential Issues
- It needs the Larken disk system:
RANDOMIZE USR 100: CAT "",andRANDOMIZE USR 100: LOADare LKDOS commands, and on a stock TS2068 the program will not work as printed. - In line 120
NEXT Fsits afterTHEN, so the trimming loop only continues while it finds spaces; this works because it stops at the first character of the name.
Typed in from the Mike’s Notebook column on RMG Enterprises’ monthly RMG UPDATES disk for March 1990, where the program exists only as a listing in the column’s text. Because it is a Larken utility it is archived as printed, not converted; It was tokenized for tape and tested in ZEsarUX.
Source Code
10 POKE 23658,8: PAPER 1: BORDER 0: INK 9: CLS : DIM C$(10)
20 ON ERR GO TO 40
30 RANDOMIZE USR 100: CAT "",
40 PRINT #1;AT 0,0;"'ENTER' advances Cursor, Space Bar selects file, 'X' CATs Disk."
50 FOR L=0 TO 21
60 LET P=0: LET Q=9: GO SUB 160: LET P=16: LET Q=25: GO SUB 160
70 NEXT L: GO TO 50
80 LET B$="": LET E=10: ON ERR RESET
90 FOR C=P TO Q
100 LET A$=SCREEN$ (L,C): LET B$=B$+A$
110 NEXT C
120 FOR F=LEN B$ TO 1 STEP -1: IF CODE B$(F)=32 THEN LET E=E-1: NEXT F
130 LET B$=B$( TO E)
140 PAPER 7: INK 0: BORDER 7: CLS : PRINT #1;AT 0,0; FLASH 1;"LOADing..."; FLASH 0; PAPER 2; INK 9;B$
150 RANDOMIZE USR 100: LOAD B$: STOP
160 PAUSE 10: PRINT OVER 1; PAPER 2; INK 6;AT L,P;C$
170 IF INKEY$="" THEN GO TO 170
180 PRINT OVER 1; PAPER 1; INK 9;AT L,P;C$
190 IF INKEY$="X" THEN RUN
200 IF INKEY$=" " THEN GO TO 80
210 RETURNNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
