QLUTter_BAS

Utility programs vary widely in functionality. Some utility programs are single task while others are multi-task. Some simply deal with file handling while others deal more directly with the storage medium. QLUTter_BAS is a simple, six function, SuperBASIC front-end and utility program designed to help you un-clutter the files of your QL’s various storage media.

QLUTter can be used to EXEC_W a program, COPY a file from any valid medium to another, DELETE files, PRINT files, FORMAT media, or VIEW a file’s contents. QLUTter can handle over 600 files utilizing a multi-screen display. QLUTter’s only system requirement is that the storage media can not be write-protected.

QLUTter_BAS can be compiled and used within QRAM or TASKMASTER.

{Key} INPUTs

The primary utilities are accessed by the appropriate FUNCTION-key indicated in the legend a the top of the screen. The specific file is selected by keying the {‘prefix-symbol’} which precedes the filename.

The principle key inputs are as follows:

(esc) QUIT: QUITs procedure / program
F1 COPY: Copies files from any drive to any other.
F2 de-FILE: Selectively DELETEs a file from a drive.
F3 HARD-COPY: LLISTs programs / LPRINTs ASCII files.
F4 FORMAT: FORMATs a medium in any drive.
F5 pre-VIEW: Views a file’s contents.
{ } operand: prefix selects file.

FLIST_imp

The “FLIST_imp” file is created by the program to keep track of the contents of the medium. The “FLIST_imp” file can be IMPORTed into Quill to provide a formatted, hardcopy record of what is on each medium.

SELECT_DEVICE ‘0’

PRESSing ‘0’ (zero) accesses the ‘SELECT_DEVICE’ facility without going through the QUIT sequence. If you simply wish to change from ‘flp1_’ to ‘flp2_’ then you do not have to use the ‘SELECT_DEVICE’ sequence.

If you have immediate access to ‘flp1_’ and simply wish to access ‘flp2_’ then simply use the ‘right cursor’ key.

Similarly, if you have immediate access to ‘flp2_’ and simply wish to access ‘flp1_’ then simply use the ‘left cursor’ key.

If you wish to access a device other than ‘flp1_’/’ram1_’/’mdv1_’, then press ‘o’/’O’. In addition, you may use:

‘g’ for ‘flp2_’
‘m’ for ‘mdv2_’
‘t’ for ‘ram2_’
‘w’ for ‘win1_’

To use the ‘[O]ther’ choice, first press ‘o’/’O’, then input the three letter “name” of the device, then press the ‘ENTER’ key, and then the number of the device, followed by pressing the ENTER key.

To access ‘flp3_’ from ‘flp2_’ via the cursor keys, you must use a ‘shift right_cursor’ key combination.

To access ‘ram1_’ from ‘flp1_’ via the cursor keys, you must use a ‘ConTRoL left_cursor’ key combination.

(shift)[Function Key]

A ‘shift [Function Key]’ combination MAY be used whenever a source disk/tape is changed instead of SELECT_DEVICE. Thus, if you have a keyboard with ten function keys, you may use ‘F6’ for a new source disk in the ‘COPY’ utility; ‘F7’ for ‘de-FILE’, and so on.

CHANGE SERial [ ” ]

If your printer is attached to ‘SERial 2’ or you want to send the file over ‘SERial 2’ (no guarantees) for some reason, then you can “toggle” this option by PRESSing the double quote (shift ‘) sign after you have accessed the ‘HARD-COPY’ routine.

COPY … [F1]

QLUTter allows for selective COPYing of files from (m)any source disk(s)/tape(s) on your QL to any other destination medium on your QL. For example, you can copy from ‘ram3_’ to ‘flp1_’; from ‘flp1_’ to ‘mdv1_’; or any other source/destination combination you may choose.

When you access this facility, you will see a FLASHING CURSOR near the top of the screen. You must respond to it by PRESSing either the ‘ENTER’ key for the DEFAULT (i.e., ‘flp2_’ for ‘flp1_’; ‘flp1_’ for ‘flp2_’; et cetera — the DEFAULT device will always be a like storage medium); or, ‘f’, ‘m’, ‘r’, or ‘o’ (CAPS allowed), and then ‘ENTER’ to indicate your choice.

For SOURCE drives whose numerical value is greater than ‘2’ the DEFAULT DESTINATION number will be one less than the drive number being accessed.

If you select ‘o’ (OTHER) as your choice, you can input a single letter for standard devices, otherwise for non-standard devices such as on a NETwork you must INPUT three valid letters indicating a device in your system, and then PRESS the ‘ENTER’ key followed by the number of the destination device, and the the ‘ENTER’ key again. This will be the TEMPORARY DEFAULT device until you exit the utility.

de-FILE … [F2]

“De(lete)-FILE” allows for an alternative method of un-cluttering your disks. Use the ‘pre-VIEW’ utility (‘F5’) to scan the file if you are uncertain about its contents.

You will be asked to VERIFY (‘y’/’n’) prior to file DELETion.

HARD-COPY … [F3]

“HARD-COPY” allows you to send the selected file to your printer.

QLUTter recognizes Quill’s “_doc” prefix and will generate roughly formatted output.

Because QLUTter recognizes some CONTROL CODES, and because SuperBASIC LLISTings do not have LINE_FEEDs the hardcopy output of SuperBASIC programs will be difficult to read.

If you want a hardcopy LLISTing of any type, then it is recommened that you first IMPORT SuperBASIC/Archive/etc. programs into Quill (you will have to add a three letter extension to the name of the file whose core name cannot be longer than eight characters) and generated an appropriate “_doc” file by SAVing the IMPORTed program.

Output can be sent to either SERial port by toggling the double quote key.

FORMAT … [F4]

“FORMATting” can be done on any standard medium; but, exclusion has been made for “win()_” devices to prevent unintended accidents.

If you select the wrong device, the enter a name LONGER THAN 10 (ten) characters, and this will allow you to re-select or (esc)ape.

pre-VIEW … [F5]

The ‘pre-VIEW’ function allows you to view the raw contents of a file without having to LOAD it. SuperBASIC programs will appear as a LLISTing; machine code will be mostly unintelligible, non-ASCII characters; and, a Quill_doc will be displayed with breaks between paragraphs to make reading the file easier (in rare instances, the display will abort after the header and the file contents will not viewable).

THE LLISTING

The QLUTter_BAS is actually a stripped version of an older version of the QLUSTer SuperBASIC source program.

You can get a sense of how the program shares non-specific functions by comparing the mA/xp/df/hd/lk PROCedures. For example, you could change the ‘FORMAT’ utility to an ‘UN-ZIP’ utility by having the ‘rf’ PROCedure mimic the ‘mA’ PROCedure with the exception that the active line would read something like the following:

If k<c then EXEC_W ram8_unzip;""&t$&w$&"_"&ZIP$(1 to len(Zip$)-4

where the unzip program has been previously located in RAM8_.

Of course, before attempting modifications to the program, you should use the program as it is LLISTed.

ERROR handling is problematic and if you find the program hangs (as on a bad medium) then you may want to eliminate the “WHEN ERRor” statements from the ‘sx’,’xp’,’rf, and ‘cj’ PROCedures.

Because the QLUTter_BAS LLISTing now exists as a stripped version of the QLUSTer utility, many of the PROCedure names may seem cryptic. Despite what it says in some compiler manuals, the length of the PROCedure names, string names, and variable names does affect the ultimate size of a compiled program.

In lieu of REMarks, please note the following explanations for the program’s PROCedures:

PROCedure   FUNCTION                  LINE NUMBER
rz          re-window                     250
Wz          re-window                     260
yeano       yes-or-no option              280
B5          beep                          340
wx          wrong key message             360
ix          invalid drive message         370
dN          duplicate name message        380
ERmsg       invalid medium message        390
esc         escape message                400
PC          press key message             410
CLSc        clear partial screen          430
CLSd             "                        440
CLSe             "                        450
CLSo             "                        460
rCLS        reset & clear screen          480
zCLS        CLS                           500
T           top menu bar                  520
sx          access device                 540
sw          show device                   640
FI          dynamic file name(s)          720
Rx          rest of menu screen           730
rx2         bottom of menu screen         800
Uu          redirect [pseudo loop]        820
Uv               "                        830
Uw               "                        840
pk          keypress                      860
k3          keypress monitor              910
mA          main menu / EXEC_W           1170
xp          COPY utility                 1230
df          DELETE utility               1390
hd          PRINT utility                1480
rf          FORMAT utility               1580
rf2            "   subroutine            1610
other          "       "                 1830
fmat           "       "                 1910
key3        keypress monitor             2030
lk          VIEW utility                 2120
L2             " subroutine              2210
L3             " subroutine              2330
L4             " subroutine              2420
lne         COMMAND_BAR                  2510
nd             "      "                  2520
CL             "      "                  2530
K4          keypress monitor             2550
Pick        TAB/shift-TAB                2610
NxtW        move command strip           2670
PrvW           "     "      "            2690
cj          change DEVice                2790
NUT         Next Utility                 3040

Graphic commands such as LINE are not used since BLOCK draws to the screen much faster and in a more consistent manner.

SUB_DIRECTORIES

QLUTter does NOT handle sub_DIRectories; but, there are many front end programs such as QLUSTer and QLAMBer which can easily access sub_DIRectories using the same single_key design utilized by the QLUTter program.

HAPPY TRAILS,
AND COMPUTING TO YOU …

100 REMark ************************************
110 REMark *QLUTter_BAS 3.701 @ 1988-97*
120 REMark ************************************
130 :
140 MODE 0: POKE 163890,0: REMark CAPSON
150 u$=" QLUTter 3.701: "F$="_FLIST_imp"
160 t$="flp": a=1: j=1: D$="ser1":pj=1:pn=7
170 "BLANK$=" ": REMark 12 spaces
180 :
190 WINDOW#2,512,256,0,0:BORDER#2,1,7: PAPER#2,7:INK#2,0:zCLS
200 WINDOW 462,250,25,3:BORDER 1,7: PAPER 7
210 WINDOW#0,413,10,50,241: PAPER#0,7: INK#0,0
220 OPEN#3,scr_458x200a27x48
230 :
240 AT#2,21,4: PRINT#2,u$;" by Al Feng "TO 3; " @ 1997 PLATYPUS Software ": FOR y=0 TO 5: AT#2,22,10: PRINT#2,y: PAUSE 10: NEXT y: END FOR y: PAUSE 40: tre=0: WCh
250 DEFine PROCedure rz: WINDOW#0,413,10,50,241:PAPER#0,7:INK#0,0: END DEFine
260 DEFine PROCedure Wz: WINDOW 462,250,25,3: END DEFine
270 :
280 DEFine PROCedure yeano: PAPER#2,7: REPeat ysn
290 c$=INKEY$
300 IF c$=CHR$(27) OR c$=="n" THEN ok=0: EXIT ysn
310 IF c$=CHR$(10) OR c$=="y" THEN ok=1: EXIT ysn
320 END REPeat ysn: END DEFine
330 :
340 DEFine PROCedure B5: BEEP 900,20: PAUSE 5: BEEP 900,40: END DEFine
350 :
360 DEFine PROCedure wx: AT#2,24,37: PRINT#2, "wrong key": B5: CLSd: B5: END DEFine
370 DEFine PROCedure iX: AT#2,24,35: PRINT#2,"invalid drive": PAUSE 10: CLSd: END DEFine
380 DEFine PROCedure dN: wx: AT#2,24,35: PRINT#2,"duplicate name": PAUSE 30: CLSd: END DEFine
390 DEFine PROCedure ERmsg: CLS#0: wx: iX: AT#2,24,35: PRINT#2,"media problem": PAUSE 10: iX: END DEFine
400 DEFine PROCedure esc: AT#2,24,35: PRINT#2,"(esc) to abort": END DEFine
410 DEFine PROCedure PC: CLSd: AT#2,24,27: INK#2,0: PRINT#2,"Press [Any_Key] to CONTINUE": PAUSE: END DEFine
420 :
430 DEFine PROCedure CLSc: BLOCK 458,225,0,10,pn: END DEFine
440 DEFine PROCedure CLSd: BLOCK#2,330,10,83,240,7: END DEFine
450 DEFine PROCedure CLSe: BLOCK 458,194,0,41,pn: END DEFine
460 DEFine PROCedure CLo: PAPER#0,pn: WINDOW#0,402,11,81,34: CLS#0: END DEFine
470 :
480 DEFine PROCedure rCLS: Wz: BORDER 1,5: END DEFine
490 :
500 DEFine PROCedure zCLS: BORDER#2,1,7: CLS#2: END DEFine
510 :
520 DEFine PROCedure T: BLOCK 26,9,432,0,7: PAPER 7: AT 0,0: INK 0: PRINT" [F1] COPY [F2] de-FILE [F3] Hard-COPY [F4] FORMAT [F5] pre-VIEW": BLOCK 458,1,0,9,5: : BORDER 1,5: BLOCK 458,2,0,235,5: BLOCK 458,12,0,236,7: PAPER 5: INK 0: END DEFine
530 :
540 DEFine PROCedure sx: DIM Z$(610,32): DELETE t$&a&F$
550 WHEN ERRor
560 ERmsg: CLS#2: tre=0: WCh
570 END WHEN
580 OPEN_NEW#6,t$&a&F$
590 DIR#6,t$&a&"_"&RN$: CLOSE#6
600 OPEN_IN#7,t$&a&F$: FOR c=0 TO 610
610 IF EOF(#7) THEN EXIT c
620 INPUT#7,Z$(c):END FOR c: CLOSE#7: c=c-1: IF c/76<=(j DIV 76)+1 THEN pj=(c DIV 76)+1 AND j=(pj-1)*76+1: END IF : END DEFine
630 :
640 DEFine PROCedure sw:IF a<=8 THEN g=a-1: IF a>=1 THEN h=g+2
650 IF g=0 AND t$="flp" THEN LET t1$="ram": ELSE t1$="flp": END IF : g1=1
660 IF g>0 THEN t1$=t$: g1=a-1: END IF
670 f=c-1-76*(pj-1)-76: IF f<=0 THEN f=0: END IF
680 PAPER pn: INK 4: AT 1,73: PRINT" ": AT 1,55: INK hCR: PRINT" page ";: INK mCR: PRINT pj;: INK hCR: PRINT" & ";: INK mCR: PRINT f&"+";: INK hCR: PRINT" files ": AT 1,1: INK mCR: PRINT"(esc) ";: INK hCR: PRINT"EXIT": INK mCR: AT 3,14: PRINT BLANK$;BLANK$(1 TO 4)
690 AT 3,14: PRINT Z$(0)
700 AT 3,57: PRINT Z$(1);BLANK$(1 TO 4): THEN INK 2: AT 1,31: PRINT FREE/1024;" K";: INK hCR: PRINT"ilobytes": END IF : END DEFine
710 :
720 DEFine PROCedure Fi: PRINT#3,"{";CHR$(n+e+48); "} ";Z$(n+e+j): END DEFine
730 DEFine PROCedure Rx: INK#3,mCR: PAPER#3,pn: AT 3,9: PRINT t$;a;"_": FOR e=0 TO 18
740 FOR n=1+e+e+e: AT#3,e,0: Fi
750 FOR n=2+e+e+e: AT#3,e,19: Fi
760 FOR n=3+e+e+e: AT#3,e,38: Fi
770 FOR n=4+e+e+e: AT#3,e,57: Fi
780 NEXT e: END FOR e: rx2
790 END DEFine sw
800 DEFine PROCedure rx2: PAPER#2,7: AT#2,24,5: INK#2,0: PRINT#2,CHR$(188);" ": BLOCK 2,13,18,235,5: AT#2,24,8: INK#2,2: PRINT#2,t1$&g1;"_"TO 71;t$&h;"_": AT#2,24,78: INK#2,0: PRINT#2,CHR$(189);" ": BLOCK 2,12,436,236,5: END DEFine
810 :
820 DEFine PROCedure Uv: CLSe: sw: Rx: k3: pk: END DEFine
830 DEFine PROCedure Ux: IF cD=1 THEN cD=0: pj=1: j=1: f1=1: RN$="": END IF : END DEFine
840 DEFine PROCedure Uw: wx: k3: pk: END DEFine
850 :
860 DEFine PROCedure k3: REPeat key
870 AT 1,13: IF PEEK_W(163976) THEN INK mCR: PRINT"CAPS ON": ELSE PRINT BLANK$(1 TO 7)
880 k=CODE(INKEY$): IF k>8 THEN EXIT key
890 END REPeat key: END DEFine
900 :
910 DEFine PROCedure pk: rz: k=k-48
920 IF k=-21 THEN zCLS: nd
930 IF k<=-1 AND k<>-14 OR k=77 OR k=78 THEN Uw
940 IF k=168 AND pj<9 AND f>0 THEN pj=pj+1: j=j+76: Uv
950 IF k=168 AND f=0 OR pj=9 THEN pj=1: j=1: Uv
960 IF k=160 AND pj>1 THEN pj=pj-1: j=j-76: Uv
970 IF k=160 AND pj<=1 THEN Uw
980 IF k=144 THEN IF a>1 THEN a=a-1: Ux: sx: Uv: ELSE : iX: Uw
990 IF k=146 AND t$=="flp" THEN t$="ram": Ux: sx: Uv
1000 IF k=146 AND t$<>"flp" THEN t$="flp": Ux: sx: Uv
1010 IF k=152 THEN IF a<2 THEN a=a+1: Ux: sx: Uv
1020 IF k=79 THEN zCLS: tre=3: WCh
1030 IF k=0 THEN zCLS: tre=0: WCh
1040 IF k=184 THEN xp
1050 IF k=186 THEN Ux: sx: xp
1060 IF k=188 THEN df
1070 IF k=190 THEN Ux: sx: df
1080 IF k=192 THEN hd
1090 IF k=194 THEN Ux: sx: hd
1100 IF k=196 THEN rf
1110 IF k=198 THEN Ux: sx: : rf
1120 IF k=200 THEN lk
1130 IF k=202 THEN Ux: sx: lk
1140 IF k>=c THEN Uw
1150 END DEFine pk
1160 :
1170 DEFine PROCedure mA: hCR=2: mCR=0: pn=7: zCLS: T: PAPER 7: INK 2: AT 3,2: PRINT"EXEC_W": sw: Rx
1180 k3: pk
1190 IF k=-14 THEN wx: GO TO 1180
1200 IF k<c THEN EXEC_W t$&a&"_"&Z$(k+j)
1210 wx: mA: END DEFine
1220 :
1230 DEFine PROCedure xp: pn=7: hCR=0: mCR=2: CLSc: T: rz: AT 0,0: PRINT" { } COPY ": PAPER 7: S$=t$: IF a=1 THEN N$=a+1: ELSE N$=a-1: END IF
1240 INK 0: AT 3,2: PRINT" COPY ";TO 59;BLANK$: sw: Rx
1250 INK 0: AT 1,23: PRINT" [f]lp"&N$&"_ [r]am"& N$&"_ [w]in"&N$&"_ "
1260 AT 2,35: PRINT"[o]ther": CLS#0: AT#2,24,33: PRINT#2,"<ENTER> == default": PAPER#2,7: INK 0: AT 3,31: PRINT" to ";BLANK$;BLANK$(TO 9): INK 2: AT 3,36: INPUT o$
1270 IF o$=="f" THEN S$="flp": ELSE IF o$=="w" THEN S$="win": ELSE IF o$=="r" THEN S$="ram": ELSE IF o$=="m" THEN S$="mdv": END IF
1280 BLOCK 186,20,138,10,pn: IF o$=="o" THEN w=1: r=3: p=36: Oth: S$=o$: END IF
1290 IF S$&N$==t$&a THEN wx: iX: xp: ELSE : INK 0: AT 3,33: PRINT"to ";: INK 2: PRINT S$;N$;"_";BLANK$
1300 rx2: k3: pk
1310 IF k=-14 THEN wx: GO TO 1300
1320 IF k<c THEN CLS#0
1330 WHEN ERRor
1340 ERmsg: GO TO 1240
1350 END WHEN
1360 DEL: COPY t$&a&"_"&Z$(j+k) TO S$&N$&"_"&Z$(j+k): rz: GO TO 1240
1370 END DEFine xp
1380 :
1390 DEFine PROCedure df: pn=2: hCR=0: CLSc: T: AT 0,14: PRINT" { } de-FILE "
1400 mCR=7: PAPER pn: INK 0: AT 3,1: PRINT"de-FILE";TO 59;BLANK$: sw: Rx
1410 k3: pk
1420 IF k=-14 THEN wx: GO TO 1410
1430 CLS#0: mCR=0: Rx: INK 5: AT 3,1: PRINT "de-FILE": INK 7: AT 3,14: PRINT Z$(j+k);: INK 5: PRINT" (y/n)?";BLANK$: yeano
1440 IF k<c THEN CLSd: DELETE t$&a&"_"&Z$(j+k)
1450 sx: IF c-1=76*(pj-1) THEN mCR=7: INK 0: LET pj=1: j=1: sw: END IF : CLSe: GO TO 1400
1460 END DEFine df
1470 :
1480 DEFine PROCedure hd: hCR=0: mCR=2: pn=7: CLSc: T: AT 0,28: PRINT" { } ";D$;" COPY ": PAPER 7: INK 0: AT 3,3:PRINT"PRINT": sw: Rx
1490 STRIP 5: AT 0,28: PRINT" { } ";D$;" COPY "
1500 PAPER 7: CLSd: k3: pk
1510 IF k=-14 AND D$="ser1" THEN D$="ser2": GO TO 1490
1520 IF k=-14 AND D$="ser2" THEN D$="ser1": GO TO 1490
1530 CLS#0: INK#2,2: AT#2,24,30: PRINT#2,"printer ready ... (y/n)?": AT 3,14: INK 2: PRINT Z$(k+j);BLANK$: yeano: CLSd: IF ok=0 THEN sw: GO TO 1500
1540 IF k<c THEN cop=1: L2: END IF
1550 CLOSE#7: CLSd: sw: Rx: GO TO 1500
1560 END DEFine hd
1570 :
1580 DEFine PROCedure rf: hCR=5: mCR=5: pn=0: CLSc: T: AT 3,2: PAPER 0: INK 7: PRINT"FORMAT ";: INK 2: PRINT t$;a;"_": sw: Rx: rf2
1590 END DEFine rf
1600 :
1610 DEFine PROCedure rf2
1620 PAPER 7: AT 0,0: PRINT TO 45; : PAPER 5 : INK 0: PRINT " { } FORMAT ";: PAPER 7: PRINT BLANK$;BLANK$(1 TO 6): CLS#0
1630 WINDOW#0,124,132,297,14: PAPER#0, 7: BORDER #0,1,0: INK#0, 0: CLS#0
1640 AT#0,0,0: STRIP#0,7: INK#0,0
1650 AT#0,2,2: PRINT#0,"flp1_ == [F1] "
1660 AT#0,4,2: PRINT#0,"flp2_ == [F2] "
1670 AT#0,6,2: PRINT#0,"mdv1_ == [F3] "
1680 AT#0,8,2: PRINT#0,"mdv2_ == [F4] "
1690 AT#0,10,2: INK#0,0: PRINT#0,"OTHER == [F5] "
1700 AT#0,12,0: STRIP#0,5: PRINT#0,TO 4; "Use CAUTION! ": STRIP#0,7: INK#0,0
1710 key3
1720 SELect ON ke
1730 =81,81+32: GO TO 140
1740 =27: CLS: BEEP 900,20: rf2
1750 =232: drive$="flp": num$="1": L=2:fmat
1760 =236: drive$="flp": num$="2": L=4:fmat
1770 =240: drive$="mdv": num$="1": L=6:fmat
1780 =244: drive$="mdv": num$="2": L=8:fmat
1790 =248: L=10: other
1800 END SELect
1810 END DEFine rf2
1820 :
1830 DEFine PROCedure other
1840 AT#0,L,2: PRINT#0," ";CHR$(188);" [drive]";BLANK$
1850 AT#0,L,2: INPUT#0,drive$: IF LEN(drive$)<>3 THEN GO TO 1840
1860 IF drive$=="mdv" OR drive$=="flp" OR drive$=="ram" THEN GO TO 1870: ELSE GO TO 1840
1870 AT#0,L,2: PRINT #0,drive$&" "&CHR$(188);BLANK$: AT #0,L,5: INPUT#0,num$: IF LEN(num$)>1 OR CODE(num$)>=58 OR CODE(num$)<=47 THEN GO TO 1870
1880 fmat
1890 END DEFine other
1900 :
1910 DEFine PROCedure fmat
1920 STRIP#0,2: INK#0,7: AT#0,L,0: PRINT#0," "; drive$&num$&"_ ";CHR$(188);" ": AT #0,L,7: INPUT#0,label$
1930 IF drive$=="ram" THEN FOR LNn=1 TO LEN(label$): IF CODE(label$(LNn))>=58 OR CODE(label$(LNn))<=47 THEN GO TO 1920: NEXT LNn: END FOR LNn
1940 IF LEN(label$)>10 THEN BEEP 2000,20: AT#0,L+1,0: STRIP#0,7: PRINT#0,BLANK$: IF L=10: END IF : rf2
1950 WHEN ERRor
1960 ERmsg: AT#2,24,35: PRINT#2,"format failed": GO TO 1990
1970 END WHEN
1980 FORMAT drive$&num$&"_"&label$
1990 WINDOW#0,413,10,50,241: PAPER#0,7
2000 PAUSE 20: CLSc: sw: Rx: rf2
2010 END DEFine fmat
2020 :
2030 DEFine PROCedure key3
2040 REPeat key
2050 ke=CODE(INKEY$)
2060 IF ke=81 OR ke=81+32 OR ke=232 OR ke=236 OR ke=240 OR ke =244 OR ke=248 THEN EXIT key
2070 IF ke<236 AND ke > 27 THEN BEEP 900,40: key3
2080 IF ke=27 THEN PAPER 7: CLS: BEEP 900,20: STRIP 7: nd
2090 END REPeat key
2100 END DEFine key3
2110 :
2120 DEFine PROCedure lk: hCR=0: mCR=2: pn=7
2130 CLSc: T: AT 0,58: PRINT" { } pre-VIEW": BLOCK 26,10,432,0,5: PAPER 7: AT 3,1: INK 0: PRINT"preVIEW ": sw: Rx
2140 k3: pk
2150 IF k=-14 THEN wx: GO TO 2140
2160 CLS: PAPER 7: BLOCK 458,12,0,0,7: CLSc: BLOCK 458,1,0,235,5: AT 0,37: INK 2: PRINT Z$(j+k): INK 0: BLOCK 458,1,0,10,5
2170 IF k<c THEN AT 0,23: PRINT"pre-VIEWing: ": cop=0: L2
2180 B5: WINDOW 462,250,25,3: PC: BORDER 1,5: CLSd: GO TO 2130
2190 END DEFine lk
2200 :
2210 DEFine PROCedure L2: IF cop=0: WINDOW 448,214,33,22: INK 0: CLS: esc: END IF
2220 IF cop=1: OPEN_NEW#7,D$: END IF
2230 OPEN#6,t$&a&"_"&Z$(j+k): esc
2240 IF EOF(#6) THEN IF cop=1: PRINT#7,BLANK$: END IF : GO TO 2300: END IF
2250 LET i$=INKEY$
2260 IF i$=CHR$(27) THEN CLSd: AT#2,24,36: PRINT#2,"abort? (y/n)": yeano: IF ok=1 THEN GO TO 2300: ELSE esc: IF cop=0: GO TO 2240: END IF : IF cop=1: PRINT#7,BLANK$: GO TO 1550: END IF
2270 LET i$=INKEY$(#6)
2280 IF cop=0 THEN L3: GO TO 2240
2290 IF cop=1 THEN L4: GO TO 2240
2300 CLOSE#6: IF cop=0: GO TO 2190: END IF : IF cop=1 THEN GO TO 1550: END IF
2310 END DEFine L2
2320 :
2330 DEFine PROCedure L3:MD$=Z$(j+k)
2340 REPeat here
2350 IF LEN(MD$)<=3 THEN IF CODE(i$)>126 OR CODE(i$)<32: INK 5: ELSE : INK 0: END IF : EXIT here
2360 IF MD$(LEN(MD$)-3 TO LEN(MD$))=="_doc" AND LEN(MD$)>3 AND MD$(LEN(MD$)-3 TO LEN(MD$))=="_doc" THEN IF CODE(i$)=0 THEN PRINT: END IF : IF CODE(i$)=8 THEN PC: rCLS: CLOSE#7: lk
2370 IF CODE(i$)>126 OR CODE(i$)<32: INK 5: ELSE : INK 0: END IF : EXIT here
2380 END REPeat here
2390 PRINT i$;
2400 END DEFine L3
2410 :
2420 DEFine PROCedure L4:MD$=Z$(j+k)
2430 REPeat hier
2440 IF LEN(MD$)<=3 THEN IF CODE(i$)>126 OR CODE(i$)<32: i$=" ": END IF : EXIT hier
2450 IF LEN(MD$)>3 AND MD$(LEN(MD$)-3 TO LEN(MD$))=="_doc" THEN IF CODE(i$)=0 THEN PRINT#7,CHR$(13): END IF : IF CODE(i$)=8 THEN PRINT#7,CHR$(12): hd: END IF
2460 IF CODE(i$)>126 OR CODE(i$)<32: i$=" ": END IF : EXIT hier
2470 END REPeat hier
2480 PRINT#7,i$;
2490 END DEFine L4
2500 :
2510 DEFine PROCedure lne: BLOCK#2,458,1,24,2,0: BLOCK 458,1,0,10,0: END DEFine
2520 DEFine PROCedure nd: PAPER 7: lne: tre=1: WCh: END DEFine
2530 DEFine PROCedure CL: BLOCK 450,220,0,11,7:PAPER 7: INK 5: AT 0,64: PRINT CHR$(188);' shift TAB ': AT 0,0: PRINT" TAB ";CHR$(189);:INK 0: PRINT" SELECT_DEVICE EXEC_W UTILITIES ";TO 57;" EXIT ": PAPER 5: INK 0: FREE=(PEEK_L(163856)-PEEK_L(163852)-1024): END DEFine
2540 :
2550 DEFine PROCedure K4: PAPER 7: REPeat key
2560 ike=CODE(INKEY$)
2570 IF ike=9 OR ike=32 OR ike=252 OR ike=253 OR ike>47 AND ike<58 THEN EXIT key
2580 IF ike>=58 AND ike<252 THEN K4
2590 END REPeat key: END DEFine K4
2600 :
2610 DEFine PROCedure Pick
2620 IF ike=253 THEN PrvW
2630 IF ike=9 THEN NxtW
2640 IF ike=252 THEN B5: GO TO 3160
2650 END DEFine Pick
2660 :
2670 DEFine PROCedure NxtW: tre=tre+1: IF tre=4 THEN tre=0
2680 WCh: END DEFine
2690 DEFine PROCedure PrvW: tre=tre-1: IF tre<0 THEN tre=3
2700 WCh: END DEFine
2710 :
2720 DEFine PROCedure WCh: lne: CL
2730 IF tre=0 THEN cj
2740 IF tre=1 THEN AT 0,22: PRINT" EXEC_W ": K4: Pick: mA
2750 IF tre=2 THEN AT 0,30: PRINT" UTILITIES ": K4: Pick: NUT
2760 IF tre=3 THEN AT 0,57: PRINT" EXIT ": K4: Pick: GO TO 3160
2770 END DEFine WCh
2780 :
2790 DEFine PROCedure cj: fen=0: RN$="": pn=7: CLSe: BLOCK 90,100,42,11,0: BLOCK 88,99,43,11,7: BLOCK 88,10,43,100,5: AT 0,7: PRINT" SELECT_DEVICE "
2800 PAPER 5: INK 0: AT 10,8: PRINT"[ ";t$&a;"_mode ]": AT 11,7: INK 7: PAPER 0: PRINT u$: PAPER 7
2810 INK 0: BEEP 100,29: AT 2,9: PRINT'"F" = flp1_': AT 4,9: PRINT'"R" = ram1_': AT 6,9: PRINT'"M" = mdv1_': AT 8,9: PRINT'"O" = other'
2820 s=CODE(INKEY$(-1))
2830 IF s=9 THEN CLS#0: BLOCK 90,112,42,11,7: tre=1: WCh
2840 IF s=27 THEN CLS#0: BLOCK 90,112,42,11,7: tre=3: WCh
2850 IF s=253 THEN CLS#0: BLOCK 90,112,42,11,7: tre=3: WCh
2860 IF s=70 OR s=102 THEN t$="flp": a=1
2870 IF s=71 OR s=103 THEN t$="flp": a=2
2880 IF s=77 OR s=109 THEN t$="mdv": a=1
2890 IF s=78 OR s=110 THEN t$="mdv": a=2
2900 IF s=82 OR s=114 THEN t$="ram": a=1
2910 IF s=84 OR s=116 THEN t$="ram": a=2
2920 IF s=87 OR s=119 THEN t$="win": a=1
2930 IF s=79 OR s=111 THEN WINDOW#0,90,30,69,84: w=0: r=0: p=8: Oth: W$=N$: t$=o$
2940 WHEN ERRor
2950 ERmsg: cj
2960 END WHEN
2970 WINDOW#0,413,10,50,241: cD=0: RN$="": sx: B5: nd: END DEFine
2980 DEFine PROCedure Oth
2990 PAPER#w,pn: AT#w,r,p: PRINT#w,' ';CHR$(188);'_ ': AT#w,r,p: INPUT#w,o$: IF o$="" OR o$=="f" THEN o$="flp": END IF : IF o$=="r" THEN o$="ram": END IF : IF o$=="w" THEN o$="win": END IF : IF o$=="n" THEN o$="ndk": END IF : INK#w,0: AT#w,r,p: PRINT#w,o$: IF LEN(o$)<>3 THEN GO TO 2990: ELSE
3000 AT#w,r,p+3: PRINT#w," ": AT#w,r,p+3: INPUT#w,N$: IF LEN(N$)=0 THEN GO TO 3000: END IF
3010 IF CODE(N$)<58 AND CODE(N$)>47 THEN GO TO 3020: ELSE GO TO 3000
3020 a=N$: END DEFine
3030 :
3040 DEFine PROCedure NUT: pn=5: T: BLOCK 458,1,0,10,7: PAPER 7: REPeat k2
3050 k=CODE(INKEY$): SELect ON k
3060 =9: CLS: BORDER 1,7: tre=3: WCh: =253: CLS: BORDER 1,7: tre=2: WCh
3070 =27: CLS: nd: =128: cj: =232: xp: =236: df: =240: hd: =244: rf: =248: lk
3080 END SELect : END REPeat k2: END DEFine
3090 :
3100 CLS#2: AT#2,24,31: PRINT#2," @ PLATYPUS Software "

Tags

People