Compucolor.org – Virtual Media

Listing of file='VID8.BAS;01' on disk='vmedia/home_video_library-sector.ccvf'

100 CLEAR 5000
110 DIM TD$(16)
120 PLOT 12,14,22
130 PLOT 3,27,3,18
140 PRINT "VIDEO 8"
150 PLOT 15,23
160 PLOT 3,13,8
170 PRINT "SORT AND PRINT BY CASSETTE NUMBER"
180 PLOT 15
190 PLOT 3,20,14
200 FILE "R",1,"VPROG",4
210 GET 1,1,1;NR
220 DIM KEY$(NR)
230 DIM REC(NR)
240 FILE "R",2,"VPROG.IDC",1
250 FOR ZZ= 1TO NR
260 KEY$(ZZ)= KEY$(1)
270 NEXT ZZ
280 FOR SUB= 2TO NR- 1
290 GET 1,SUB,120;IS$[4]
300 PLOT 3,20,18
310 PRINT "Reading: "SUB
320 FOR AA= SUB- 1TO 1STEP - 1
330 KEY$(AA+ 1)= KEY$(AA)
340 REC(AA+ 1)= REC(AA)
350 IF IS$= < KEY$(AA- 1)GOTO 390
360 KEY$(AA)= IS$
370 REC(AA)= SUB
380 GOTO 400
390 NEXT AA
400 NEXT SUB
410 PLOT 3,12,22
420 PRINT "FINISHED SORTING - WRITING OUT INDEX"
430 FOR ZZ= 1TO NR- 2
440 PUT 2,ZZ,1;REC(ZZ)
450 FOR A= 1TO 50:NEXT A
460 NEXT ZZ
470 PUT 2,ZZ+ 1,1;999999
480 FILE "C",1,2
1000 PLOT 12,14,29,18
1010 PLOT 3,20,5
1020 PRINT "VIDEO 8 - PART 2"
1030 PLOT 22
1040 PLOT 3,16,9
1050 PRINT "PRINT BRIEF PROGRAM LIST"
1060 PLOT 15
1070 PLOT 3,12,15
1080 INPUT "TURN PRINTER ON AND HIT 'ENTER' ";JU$
1090 FILE "R",3,"DATE",1
1100 GET 3,1,1;DD,MM,YY,DA$[38]
1110 FILE "C",3
1120 HA$= "Program List by Cassette Number  as at: "
1130 HA$= HA$+ DA$
1140 LA= LEN (HA$)
1150 HB$= LEFT$ ("____________________________________________________________",LA)
1160 HC$= "Cass Pos  Time  Title                            Comment"
1170 FILE "R",4,"VCAT",1
1180 PLOT 19
1190 FOR A= 1TO 16
1200 GET 4,A,1;CN$[2],CD$[24]
1210 TD$(A)= CD$
1220 NEXT A
1230 FILE "C",4
1240 FILE "R",1,"VPROG",2
1250 FILE "R",2,"VPROG.IDC",2
1260 GET 1,1,1;TR
1270 FOR NR= 1TO TR- 2
1280 GET 2,NR,1;RE(NR)
1290 NEXT NR
1300 GOSUB 3000
1310 FOR NR= 1TO TR- 2
1320 GET 1,RE(NR),1;PP$[3],PC$[2],PT$[30],PB$[20]
1330 GET 1,RE(NR),56;P1$[20],P2$[20],P3$[20],PT,PN$[3],PO$[1]
1340 IF LEFT$ (PB$,7)= "DELETED"GOTO 1500
1350 IF LC> 56THEN GOSUB 3000
1360 TC$= PN$
1370 IF TC$= LC$GOTO 1430
1380 LC$= TC$
1390 GOSUB 4000
1400 PRINT
1410 GOSUB 4060
1420 LC= LC+ 1
1430 REM  ******* PRINT EACH LINE ********
1440 MI$= RIGHT$ (("    "+ STR$ (PT)),5)
1450 PL$= PN$+ "    "+ PO$+ MI$+ "    "+ PT$+ "  "+ PB$
1460 GOSUB 4000
1470 PRINT PL$
1480 LC= LC+ 1
1490 GOSUB 4060
1500 NEXT NR
2000 REM
2010 REM  *********** WIND UP PROGRAM ***********
2020 REM
2030 PUT 2,1,1;NR
2040 FILE "C",2
2050 PLOT 27,11
2060 LOAD "0:VMENU",RUN
3000 REM
3010 REM  ******** PRINT HEADINGS ***********
3020 REM
3030 GOSUB 4000
3040 PLOT 12
3050 FOR A= 1TO 4
3060 PRINT
3070 NEXT A
3080 PRINT HA$
3090 PRINT HB$
3100 PRINT
3110 PRINT HC$
3120 PRINT
3130 GOSUB 4060
3140 RETURN
4000 REM
4010 REM  ******** TURN PRINTER ON **********
4020 REM
4030 POKE 33289,80
4040 POKE 33265,14
4050 RETURN
4060 REM
4100 REM  ******* TURN PRINTER OFF **********
4110 REM
4120 POKE 33289,64
4130 POKE 33265,0
4140 RETURN