Here is a super program for the QL that will make an index label for disk or microdrive in tiny print with an Epson compatible printer. Even without a printer, it is useful to view the contents as it sorts them alphabetically. It is a public domain donation to QL users from my friend Real Gagnon, who publishes a French language QL newsletter in Canada.
It can also be studied to learn some printing techniques for use with QSL cards.
DLO_BAS prints a sorted directory on a label.
To run the software, type LRUN xxxx_DLO_BAS where xxxx is the device
You answer the questions and then you type LIST_PRT to print the labels on the printer.
The printer should be an EPSON compatible.
The labels are printed in ELITE , SUPERSCRIPT , COMPRESSED mode with a line spacing of 16/216″.
DLO_BAS is a Public Domain Software for the Sinclair QL.
By Râal Gagnon
4870 Henri-Julien
Montrâal Quâbec
CANADA H2T 2E1
100 REMark disk label organizer .5 par GAG-o86 MTL
110 :
115 WINDOW 512,256,0,0
116 BORDER 3,45
117 PAPER 0:INK 7
120 CLS
125 PRINT "IMPORTANT: No WRITE PROTECT TABS in FLP1_ please..."\\
130 INPUT 'Directory of which device (ex. flp1_ mdv1_) ? ';dev$
135 INPUT 'Write the TITLE/NOTE or just press [ENTER] ? ';titre$
140 read_dir :REMark lecture du directory
150 display_files :REMark montre les fichiers
160 sort fi$ :REMark classe en ordre alphabâtique
170 display_files :REMark montre les fichiers en ordre
172 :
175 BEEP 1000,10
177 CSIZE#0,1,0
178 BORDER#0,1,7
180 PRINT#0,'TYPE LIST_PRT -> to print'
182 CSIZE#0,0,0
185 STOP
190 :
200 :
210 DEFine PROCedure read_dir
220 DELETE flp1_dir1
230 OPEN_NEW#5,flp1_dir1
240 DIR#5,dev$
250 CLOSE#5:OPEN#5,flp1_dir1
255 :
260 REMark trouve l'espace prise sur disque
265 :
270 CLS
280 INPUT#5,fr_sp$
290 PRINT fr_sp$
295 :
300 REMark compte les fichiers et trouve le plus long
305 :
310 INPUT#5,dummy$ :REMark espace vide
320 nfiles=0
330 lmax=0
340 REPeat loop
350 INPUT #5,a$
360 IF EOF(#5):EXIT loop
370 lfi=LEN(a$)
380 IF lfi>lmax:lmax=lfi
390 nfiles=nfiles+1
400 END REPeat loop
410 PRINT 'There is ';nfiles;' files on this disk!'
420 CLOSE#5:OPEN#5,flp1_dir1
430 INPUT#5,dummy$:INPUT#5,dummy$ :REMark espace disponible + vide
435 :
437 REMark creation du tableau contenant les fichiers...
438 :
440 DIM fi$(nfiles,lmax)
445 :
450 REMark lecture des fichiers
455 :
460 i=1
470 REPeat loop
480 INPUT#5,a$
490 IF EOF(#5):EXIT loop:END IF
500 IF a$<>'dir1'
510 fi$(i)=a$
520 i=i+1
530 END IF
540 END REPeat loop
550 CLOSE#5:DELETE flp1_dir1
560 END DEFine
570 :
575 :
580 DEFine PROCedure display_files
590 f=1
595 PRINT
600 FOR i=1 TO INT(nfiles/5)
610 FOR ii=0,15,30,45,60
620 PRINT TO ii,fi$(f);
630 f=f+1
640 END FOR ii
650 PRINT
660 END FOR i
670 l=0
680 FOR i=f TO nfiles
690 PRINT TO l,fi$(i);
700 l=l+15
710 END FOR i
720 END DEFine
730 :
735 :
737 REMark procâdures sort & qsort, source SINCLAIR QL WORLD!
738 :
740 DEFine PROCedure sort (array)
750 PRINT \\
760 INK 4
770 PRINT 'Sorting ...'\\
780 INK 7
790 qsort array,1,DIMN(array)
800 END DEFine sort
810 :
820 DEFine PROCedure qsort (array,bottom,top)
830 LOCal loop,lo,hi,pointer
840 lo=bottom:hi=top
850 pointer=bottom
860 REPeat loop
870 IF lo>=hi:EXIT loop
880 IF array(lo)>array(hi)
890 temp$=array(lo)
900 array(lo)=array(hi)
910 array(hi)=temp$
920 IF pointer=lo
930 lo=lo+1:pointer=hi
940 ELSE
950 hi=hi-1:pointer=lo
960 END IF
970 ELSE
980 IF pointer=lo
990 hi=hi-1
1000 ELSE
1010 lo=lo+1
1020 END IF
1030 END IF
1040 END REPeat loop
1050 IF ABS(top-bottom)<2 THEN RETurn
1060 qsort array, bottom, pointer-1
1070 qsort array, pointer+1, top
1080 END DEFine qsort
1090 :
1095 :
1100 DEFine PROCedure list_prt
1110 l$=' '
1120 OPEN#5,ser1
1125 :
1127 REMark imprimante ->ELITE,COMPRESSE,SUPERSCRIPT,interligne 16/216"
1128 :
1130 PRINT#5,CHR$(27);"M";CHR$(15);CHR$(27);"S0";CHR$(27);"3";CHR$(16);
1140 PRINT#5,CHR$(27);'W1';titre$\fr_sp$;CHR$(27);'W0' :REMark large on/off
1142 REMark NBR_COL = how many column on the labels
1145 nbr_col=6
1150 n_lignes=INT(nfiles/nbr_col)
1170 FOR ligne=0 TO n_lignes
1180 FOR colonne=1 TO nbr_col
1190 IF ((ligne*6)+colonne)>nfiles:EXIT ligne
1200 long_f=LEN(fi$((ligne*6)+colonne))
1210 IF long_f>12:f$=fi$(((ligne*6)+colonne),1 TO 11):ELSE : f$=fi$((ligne*6)+colonne)
1220 l_f=13-LEN(f$)
1230 PRINT #5,f$;l$(1 TO l_f);
1240 END FOR colonne
1250 PRINT#5
1260 END FOR ligne
1270 PRINT#5,CHR$(27);"@"\\\\\\\\\\\\:CLOSE#5
1280 END DEFine
1290 :
1300 DEFine PROCedure update
1310 DELETE flp1_dlo_bas
1320 SAVE flp1_dlo_bas
1330 END DEFine
