10
20
30
40
50
60 MODE7
70 *|FX5,4
80 *|PS BLANK
90 ON ERROR PROCreport
100 PROCinit:PROCmenu
110 END
120 DEF PROCinit
130 VDU23;8202;0;0;0;
140 DIM A$(38)
150 DIM title$(2)
160 DIM detail$(2)
170 DIM dolby$(2)
180 C$=""
190 ENDPROC
200 DEF PROCcass
210 side=1
220 input$="type of cassette"
230 PROCinput(11)
240 IFin$=""THEN C$=C$ ELSE C$=in$
250 ENDPROC
260 DEF PROCmenu
270 ON ERROR PROCreport
280 CLS
290 *FX21,0
300 PRINTTAB(2,2)CHR$131"CASSETTE INDEX LABEL MENU";
310 IFC$<>""THEN PRINT" FOR"
320 PRINTTAB(14);CHR$131C$
330 PRINTTAB(3,5);CHR$133"S";CHR$135"ave data"'
340 PRINTTAB(3);CHR$133"L";CHR$135"oad data"'
350 PRINTTAB(3);CHR$133"P";CHR$135"rint full index card"'
360 PRINTTAB(3);CHR$133"T";CHR$135"itle only to printer"'
370 PRINTTAB(3);CHR$133"E";CHR$135"nter new details"'
380 PRINTTAB(3);CHR$133"V";CHR$135"iew/Amend existing details"'
390 PRINTTAB(3);CHR$133"Q";CHR$135"uit program"''
400 PRINTTAB(2)CHR$130"PLEASE SELECT OPTION"
410 x$=GET$
420 IFx$="E" OR x$="e"THEN PROCcass:PROCside:PROCtitle:PROCtrack:PROCscreenprint
430 IFx$="V" OR x$="v"THEN PROCcass:PROCside:PROCscreenprint
440 IFx$="P" OR x$="p" PROCpprint
450 IFx$="T" OR x$="t" PROCtprint
460 IFx$="S" OR x$="s" THEN PROCsave
470 IFx$="L" OR x$="l" THEN PROCload
480 IFx$="Q" OR x$="q" THEN PROCquit
490 IFx$="*" PROCosc
500 GOTO280
510 ENDPROC
520 DEF PROCside
530 CLS
540 PRINTTAB(3,5)"Enter/View information for"''TAB(15)"SIDE 1 or SIDE 2 ?"TAB(5,23)"]Press <RETURN> to abort["
550 x$=GET$
560 side=VALx$
570 IFside<>0AND side<>1AND side<>2 THEN 540
580 IFside=0 THEN PROCmenu
590 IFside=1 THEN beg=1 ELSE beg=20
600 ENDPROC
610 DEF PROCtitle
620 ti=1
630 CLS
640 input$="new Title (max 26 chars)":PROCinput(26)
650 IFin$=""THEN title$(side)=title$(side) ELSE title$(side)=in$
660 input$="Details for SIDE "+STR$(side)+" (max 65 chars)":PROCinput(65)
670 IFin$=""THEN detail$(side)=detail$(side) ELSE detail$(side)=in$
680 input$="DOLBY for SIDE "+STR$(side)+" (max 3 chars)":PROCinput(3)
690 IFin$=""THEN dolby$(side)=dolby$(side) ELSE dolby$(side)=in$
700 ENDPROC
710 DEF PROCtrack
720 FORtrack=beg TO beg+18
730 input$="Text (max 31 chars)":PROCinput(31)
740 IFin$="" THEN A$(track)=A$(track) ELSE A$(track)=in$
750 NEXT
760 ENDPROC
770 DEF PROCinput(length)
780 in$=""
790 IFside=1 THEN asc=64 ELSE asc=45
800 CLS
810 IFlength=26 THEN PRINT TAB(0,5)"SIDE ";side;" existing Title is"''title$(side)''
820 IFlength=65 THEN PRINT TAB(0,5)"SIDE ";side;" existing Details are"''detail$(side)''
830 IFlength=31 THEN PRINT TAB(0,5)"SIDE ";side;" TRACK ";CHR$(track+asc);" existing Text is"''A$(track)''
840 IFlength=3 THEN PRINT TAB(0,5)"SIDE ";side;" existing DOLBY detail is"''dolby$(side)''
850 IFlength=11 THEN PRINT TAB(0,5)"Existing type is"''C$''
860 PRINT"Enter ";input$''"or press <RETURN> if OK"'''
870 z$=GET$
880 IF ASC z$=13 THEN ENDPROC
890 IF ASC z$=127 THEN in$=LEFT$(in$,LENin$-1) ELSE in$=in$+z$
900 IF LEN in$>length THEN in$=LEFT$(in$,length):VDU7
910 PRINTTAB(0,16);in$;" ";CHR$8;
920 GOTO870
930 ENDPROC
940 DEF PROCscreenprint
950 CLS
960 PRINT title$(side);TAB(31,0);"DOLBY ";dolby$(side);TAB(0,1);detail$(side);TAB(31,2);"SIDE ";side'
970 IFside=1 THEN beg=1 ELSE beg=20
980 IFside=1 THEN asc=64 ELSE asc=45
990 FORtrack=beg TO beg+18
1000 VDUtrack+asc;
1010 PRINT" ";A$(track)
1020 NEXT
1030 PROCcheck
1040 ENDPROC
1050 DEF PROCcheck
1060 ti=0
1070 PRINT"Enter track to amend-<T> for Title"'"or <RETURN> if OK";
1080 x=GET
1090 IFx=84 OR x=116 THEN PROCtitle
1100 IFx>90 THEN x=x-32
1110 IFx=13 THEN ENDPROC
1120 IFside=1 THEN track=x-64 ELSE track=x-45
1130 IFtrack<1 OR track>side*19 THEN 1170
1140 IFti=1 THEN 1170
1150 input$="Text (max 31 chars)":PROCinput(31)
1160 IFin$="" THEN A$(track)=A$(track) ELSE A$(track)=in$
1170 PROCscreenprint
1180 ENDPROC
1190 DEF PROCpad
1200 FORtrack=1TO38
1210 A$(track)=A$(track)+STRING$(32-LENA$(track)," ")
1220 NEXT
1230 FORside=1TO2
1240 title$(side)=title$(side)+STRING$(26-LENtitle$(side)," ")
1250 detail$(side)=detail$(side)+STRING$(65-LENdetail$(side)," ")
1260 NEXT
1270 ENDPROC
1280 DEF PROCpprint
1290 PROCdatacheck:IFdatalen=0 VDU7:PRINTTAB(2,20);CHR$129"You have not entered any data yet!":FORwait=1TO6000:NEXT:ENDPROC
1300 PROConline:IF buffer=FALSE ENDPROC
1310 PRINTTAB(2,20);CHR$129"PRINTING IN PROGRESS - PLEASE WAIT"
1320 PROCpad
1330 *FX3,10
1340 VDU27,64:
1350 VDU27,51,14:
1360 VDU27,15:
1370 VDU27,85,1:
1380 PRINT"SIDE 1 DOLBY ";dolby$(1);TAB(34);"SIDE 2 DOLBY ";dolby$(2)
1390 VDU27,51,18:
1400 PRINT STRING$(65,"-");" |"
1410 VDU27,51,27:
1420 FORtrack=1TO19
1430 PRINT A$(track);"| ";A$(track+19);" |"
1440 NEXT
1450 PRINT STRING$(65,"-");" |"
1460 PRINT"SIDE 1: ";
1470 VDU27,14:
1480 VDU27,71:
1490 PRINTtitle$(1)
1500 VDU18:
1510 VDU27,72:
1520 PRINT TAB(38-LEN C$);C$
1530 VDU27,15:
1540 PRINT"SIDE 2: ";
1550 VDU27,14:
1560 VDU27,71:
1570 PRINTtitle$(2)
1580 VDU27,72:
1590 PRINT STRING$(65,"-");" |"
1600 PRINT"SIDE 1:";TAB(67)"|"'detail$(1);" |"'"SIDE 2:";TAB(67)"|"'detail$(2);" |"
1610 PRINTTAB(67);"|"
1620 FORst=1TO3:PRINT STRING$(65,"*");" |":NEXT
1630 PRINT
1640 *FX3,0
1650 ENDPROC
1660 DEF PROCsave
1670 PROCdatacheck:IFdatalen=0 VDU7:PRINTTAB(2,20);CHR$129"You have not entered any data yet!":FORwait=1TO6000:NEXT:ENDPROC
1680 ON ERROR PROCreport
1690 INPUT"ENTER FILE NAME TO SAVE : "x$
1700 OSCLI"Save "+x$+" 0+800":ch%=OPENOUT(x$)
1710 FORx=1TO38
1720 PRINT#ch%,A$(x)
1730 NEXT
1740 FORx=1TO2
1750 PRINT#ch%,title$(x),detail$(x),dolby$(x)
1760 NEXT
1770 PRINT#ch%,C$
1780 CLOSE#ch%
1790 ENDPROC
1800 DEF PROCload
1810 ON ERROR PROCreport
1820 INPUT"ENTER FILE NAME TO LOAD : "x$
1830 ch%=OPENIN(x$)
1840 FORx=1TO38
1850 INPUT#ch%,A$(x)
1860 NEXT
1870 FORx=1TO2
1880 INPUT#ch%,title$(x),detail$(x),dolby$(x)
1890 NEXT
1900 INPUT#ch%,C$
1910 CLOSE#ch%
1920 ENDPROC
1930 DEF PROCreport
1940 ON ERROR OFF
1950 CLOSE#0:*FX3,0
1960 REPORT
1970 PRINT'"Error code number ";ERR;" at Line number ";ERL
1980 PRINT"PRESS <ESC> TO STOP PROGRAM"'"PRESS <M> FOR MENU"
1990 x$=GET$
2000 IF x$="M" OR x$="m":PROCmenu
2010 GOTO1960
2020 ENDPROC
2030 DEF PROCtprint
2040 datalen=0:FORZ%=1TO2:datalen=datalen+LEN(title$(Z%)):NEXT:IFdatalen=0 VDU7:PRINTTAB(2,20);CHR$129"You have not entered a title yet!":FORwait=1TO6000:NEXT:ENDPROC
2050 PROConline:IF buffer=FALSE ENDPROC
2060 PRINTTAB(2,20);CHR$129"PRINTING IN PROGRESS - PLEASE WAIT":FORwait=1TO1000:NEXT
2070 *FX3,10
2080 VDU27,64:
2090 VDU27,15:
2100 VDU27,85,1:
2110 VDU27,50:
2120 PRINT"SIDE 1: ";
2130 VDU27,14:
2140 VDU27,71:
2150 PRINTtitle$(1)
2160 VDU27,72:
2170 PRINT"SIDE 2: ";
2180 VDU27,14:
2190 VDU27,71:
2200 PRINTtitle$(2)
2210 VDU27,72:
2220 *FX3,0
2230 ENDPROC
2240 DEF PROConline
2250 *FX21,3
2260 *FX3,10
2270 VDU2,1:FORW%=1TO500:NEXT:VDU3
2280 *FX3,0
2290 IF ADVAL(-4)<>63 buffer=FALSE:VDU7:PRINTTAB(2,20);CHR$129"Printer is busy or not on line"'TAB(21)CHR$129" - please check.":FORwait=1TO6000:NEXT:ELSE buffer=TRUE
2300 *FX21,3
2310 ENDPROC
2320 DEF PROCquit
2330 CLS:PROCdatacheck
2340 IF datalen=0 PRINTCHR$133"END";:END:ELSE PRINTTAB(0,6)"You have entered data."''"Press";:PRINTCHR$130"RETURN";:PRINTCHR$135"to return to the Menu."''"Any other key will END the program and may lose the data."
2350 x$=GET$
2360 IF ASC x$=13 PROCmenu ELSE PRINTCHR$133"END";:END
2370 ENDPROC
2380 DEF PROCdatacheck
2390 datalen=0
2400 FORZ%=1TO38:datalen=datalen+LEN(A$(Z%)):NEXT
2410 FORZ%=1TO2:datalen=datalen+LEN(title$(Z%)):NEXT
2420 FORZ%=1TO2:datalen=datalen+LEN(detail$(Z%)):NEXT
2430 FORZ%=1TO2:datalen=datalen+LEN(dolby$(Z%)):NEXT
2440 datalen=datalen+LEN(C$)
2450 ENDPROC
2460 DEFPROCosc:LOCAL A$:REPEATINPUTLINE"*"A$:OSCLIA$:UNTILA$="":ENDPROC