Mike’s Notebook: LOADER

See all articles from The Plotter v8 n3
Author(s): Michael DiRienzo
Publication: The Plotter
Pub Details: The Plotter v8 n3 (Volume 8, Issue 3)
Date: March 1990
Pages: 3-4

I recently purchased a Larken Disk System for my TS2068 and found myself frustrated by the lack of a simple and short disk file LOAD program where I didn’t have to type each file name into a LOAD menu program. I decided to use the SCREEN$ token to read file names from the screen following a disk CAT. The following brief program will do just that, and can be modified to CAT and LOAD from any disk system by changing the lines annotated below. Carefully type in the following program and change the CAT and LOAD commands in lines 30 and 150 to suit your disk system. I saved the program as an AUTOSTART file. The program will CAT the current drive and display the contents in the normal way. If the screen is full and you get the SCROLL? prompt, you may either press ENTER to continue the CAT or press the BREAK key to select and LOAD the highlighted file on the screen. ON ERR is used to allow you to LOAD a file found on the screen instead of SCROLLing to the next page. This program is user configurable by allowing you to change screen colors and selection keys. Feel free to add your own enhancements/options.

Happy TIMEXing…

LOADER

By Michael J. Di Rienzo
February 1990

  10 POKE 23658,8: PAPER 1: BORDER 0: INK 9: CLS : DIM C$(10)

(^-Sets caps, screen colors and
selects bar width

20 ON ERR GO TO 40

(^-BREAK brings a select bar.)

30 RANDOMIZE USR 100: CAT "",

(^-Larken CATalogue command.)

40 PRINT #1;AT 0,0;"'ENTER' advances Cursor, Space Bar selects file, 'X' CATs Disk."

(^-User instructions at input line.)

50 FOR L=0 TO 21

(^-Sets 10 character select bar.)

60 LET P=0: LET Q=9: GO SUB 160: LET P=16: LET Q=25: GO SUB 160

(^-Select bar moves in 2 columns
of Larken CAT screen. Bar
alternates between columns.)

70 NEXT L: GO TO 50

(^-Bar wraps back to line 1.)

80 LET B$="": LET E=10: ON ERR RESET

(^-ON ERR GO TO 50 cancelled.)

90 FOR C=P TO Q

(^-Reads highlighted file.)

100 LET A$=SCREEN$ (L,C): LET B$=B$+A$

(^-name from screen.)

110 NEXT C

120 FOR F=LEN B$ TO 1 STEP -1: IF CODE B$(F)=32 THEN LET E=E-1: NEXT F

(^-Removes any spaces to the right
of the file name.)

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$

(^-Prints LOADing file message,
resets ON ERR, allows error
messages.)

150 RANDOMIZE USR 100: LOAD B$: STOP

(^-Larken LOAD line.)

160 PAUSE 10: PRINT OVER 1; PAPER 2; INK 6;AT L,P;C$

(^-Prints select bar over file
name. Sets bar speed.)

170 IF INKEY$="" THEN GO TO 170

180 PRINT OVER 1; PAPER 1; INK 9;AT L,P;C$

(^-Removes select bar.)

190 IF INKEY$="X" THEN RUN

(^-Detects key to re-CAT.)

200 IF INKEY$=" " THEN GO TO 80

(^-Detects key to select
and LOAD the file.)

210 RETURN

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.