home *** CD-ROM | disk | FTP | other *** search
- 1 rem video phile v12
- 2 rem video tape library database with indices
- 3 rem by michael reich 9/07/86
- 4 rem using relative file - use 'create' program to start rel.file
- 5 rem *******************
- 10 poke53280,0:poke53281,0:c1$=chr$(5) :c2$=chr$(152)
- 15 uptime=(8*4096)+4
- 20 print"[147]"chr$(142)chr$(8)
- 25 sp$=" ":rem len 37
- 30 nf=10:n=100:rem # fields and records- also see line 20020
- 40 dim temp$(nf),kk$(nf),s(nf),l(nf),rc$(4),ia$(n),ib$(n),ic$(n),k$(n)
- 50 nr=0: ls$="[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
- 52 lp$="*******************"
- 55 dim q1$(n),m%(n),s%(20):rem *** used in sort ***
- 60 fori=1tonf:readf$(i),s(i),l(i):next
- 70 data title,1,20,star,21,20,co-star,41,20
- 80 data start,61,4,end,65,4,speed,69,2,time,71,3,year,74,4,type,78,5
- 90 data tape #,83,3
- 170 gosub 8000: gosub 9800
- 175 gosub 200: goto 800
- 180 poke781,x:poke782,0:goto195: rem line select
- 185 poke781,21:poke782,0:goto195
- 190 poke781,peek(214):poke782,y: rem tab
- 195 poke783,0:sys65520:return
- 196 rem *********
- 197 rem read index
- 198 rem *********
- 199 :
- 200 gosub470: rem *** init disk ***
- 205 nr=0: if mo=4 then print sc$
- 210 open 2,8,2,"0:video.index,s,r": i=0
- 220 gosub 400: rem *** ck disk error ***
- 225 if er=0 then 250
- 230 gosub640: rem *** close on no index ***
- 235 return
- 250 x=17: gosub 180: print"[150] reading index[157][157][157][157][157][157][157][157][157][157][157][157][157]";
- 252 input#2,nr
- 255 for i=1 to nr: input#2,ia$(i): next
- 260 for i=1 to nr: input#2,ib$(i): next
- 270 for i=1 to nr: input#2,ic$(i): next
- 340 gosub 460
- 350 gosub 370: print" ": return
- 370 in=150
- 380 t=ti+in
- 385 if ti<t then goto 385
- 390 return
- 400 :
- 402 rem disk utilities
- 404 :
- 410 er=0:input#15,er,er$
- 420 return
- 430 close2:ifer>0thenprinter,er$
- 440 return
- 450 close15:return
- 460 gosub430:gosub450:return: rem close all files
- 470 open15,8,15,"i0":return
- 500 rem *********
- 502 rem write index
- 504 rem *********
- 510 ifnr<1thenprint"no records in file to save":gosub370:gosub370:goto800
- 520 gosub470:rem open command channel
- 530 gosub185:print"scratching old index" :print#15,"s0:video.index"
- 560 open2,8,2,"0:video.index,s,w": gosub400:ifer=0thengoto570
- 565 gosub430:gosub450:stop
- 570 gosub22300:gosub185:print"writing index":print#2,nr
- 580 fori=1tonr:print#2,ia$(i):next: fori=1tonr:print#2,ib$(i):next
- 590 fori=1tonr:print#2,ic$(i):next
- 600 gosub460:return
- 620 printtab(14)"[145] [150] invalid [157][157][157][157][157][157][157][157][157][157][157][146]";: gosub 370: return
- 630 :
- 636 rem *****************
- 637 rem close on no index
- 638 rem *****************
- 639 :
- 640 close 2: close 15
- 650 em$="no index on disk"
- 660 if er<>62 then em$="disk unusable"
- 670 x=17: gosub 180
- 680 print em$
- 690 return
- 796 rem *********
- 797 rem menu
- 798 rem *********
- 799 :
- 800 x=6: gosub 180
- 805 print"[150]>> main menu [150]<<": print
- 810 print "[150] 1[150]- display"
- 820 print "[150] 2[150]- edit"
- 830 print "[150] 3[150]- add to file"
- 840 print "[150] 4[150]- printer"
- 845 print "[150] options"
- 850 print "[150] 5[150]- create file": print
- 860 print "[150] f8[150]- uptime"
- 865 x=21: gosub 180
- 870 print "[153] there are ";nr;"[157][153] records available."
- 875 print" "
- 880 get k$: if k$="" then 880
- 882 if k$=chr$(140) then sys uptime
- 884 k=val(k$): if (k<1) or (k>5) then 880
- 886 mo=k
- 890 on mo gosub 2000,5000,4000,7000,20000
- 895 goto800
- 935 rem screen displays using c-64 graphics chars.
- 940 y=21: n$=" rambo ": r$="[146]": d$="": gosub 8500
- 945 for x=1tozz: next
- 950 y=23: n$="star wars": r$="": d$="": gosub 8500
- 955 for x=1tozz: next
- 960 y=25: n$=" top gun ": r$="[146]": d$="": gosub 8500
- 970 return
- 1000 rem *********
- 1002 rem sort indices
- 1004 rem *********
- 1008 :
- 1009 ti$="000000":ifnr<2thenreturn
- 1010 rem ia$ array
- 1015 ifmo=2thenifp1=0thengoto1100
- 1020 forq=1tonr:q1$(q)=ia$(q):next: so=1:gosub55000
- 1030 forq=1tonr:ia$(q)=q1$(q):next
- 1100 :
- 1110 rem ib$ array
- 1115 ifmo=2thenifp2=0thengoto1200
- 1120 forq=1tonr:q1$(q)=ib$(q):next: so=2:gosub55000
- 1130 forq=1tonr:ib$(q)=q1$(q):next
- 1200 :
- 1210 rem ic$ array
- 1215 ifmo=2thenifp3=0thengoto1300
- 1220 forq=1tonr:q1$(q)=ic$(q):next: so=1:gosub55000
- 1230 forq=1tonr:ic$(q)=q1$(q):next
- 1300 return
- 1750 :
- 1770 gosub1790:printc1$mid$(ti$,4,1);":";right$(ti$,2):return
- 1780 gosub1790:printc2$mid$(ti$,4,1);":";right$(ti$,2)c1$:return
- 1790 gosub185:print"sorting index...wait ";:return
- 1996 rem *********
- 1997 rem display
- 1998 rem *********
- 1999 :
- 2000 if nr<>0 then 2010
- 2002 x=21: gosub 180: print"[153] no records to display! [153] "
- 2004 for x=1to 1750: next
- 2006 return
- 2010 w=0: print"[147]": gosub 2620: y=11
- 2020 print: print "select by: [150]s[146][158]tar": gosub 190: print "[150]m[146][158]ovie title"
- 2030 gosub 190: print "[150]t[146][158]ape #": gosub 190: print "[150]r[146][158]ecord #"
- 2035 gosub 190: print "[150]q[146][158]uit": print
- 2040 x=16:gosub180
- 2045 print "[155] <<- enter choice ->>[146]"
- 2050 get s$: if s$="" then 2050
- 2054 t$="name record #"
- 2055 if s$="q" then gosub 8000: return
- 2060 if s$="s" then print"[147]": gosub 2330: goto 2200
- 2070 if s$="m" then print"[147]": gosub 2100: goto 2200
- 2080 if s$="t" then print"[147]": gosub 2430: goto 2200
- 2082 if s$<>"r" then 2050
- 2084 gosub 2700: rem *** get record # ***
- 2085 if (s>0) and (s<=nr) then ch=s: goto 2235
- 2086 print"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157] ": goto 2050
- 2090 x=16: gosub180: print " [150] invalid [146] "
- 2095 gosub 370: goto 2040
- 2100 t$="title record #": gosub 2600
- 2110 w=1: print"[158]";: for i=1 to nr: print left$(ia$(i),20)" "mid$(ia$(i),21)
- 2115 gosub6600:next:poke198,0:return
- 2200 printspc(8)"[155]enter rec. # to display"
- 2210 print:printspc(12)"[155]or <cr> to exit[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";: k=0: ex=0
- 2220 gosub 9500: rem *** get rec # from kbd ***
- 2225 if ex=1 then gosub 8000: return
- 2230 ch=val(t$)
- 2235 gosub 3000
- 2240 goto2000
- 2330 printsc$:gosub2600
- 2340 w=1: print"[158]";: fori=1tonr:printleft$(ib$(i),20)" "mid$(ib$(i),21)
- 2345 gosub6600:next:poke198,0:return
- 2430 t$="tape # record #": printsc$:gosub2600
- 2440 w=1: print"[158]";: fori=1tonr:printleft$(ic$(i),l(10));tab(20)mid$(ic$(i),4)
- 2450 gosub6600:next:poke198,0:return
- 2600 gosub2620:print"[154]"t$
- 2610 print"******"tab(20)"*******": print: return
- 2620 print "[155]there are "nr"[157][146][155] records in file": print: return
- 2700 print "[145][145][145][145][145][145][155]enter record #:";
- 2710 gosub 9500: rem *** get kbd input ***
- 2720 s=val(t$): return
- 3000 rem *********
- 3002 rem display record
- 3004 rem *********
- 3010 printc1$"[147]display record #"ch: printls$:r1$="":r2$=""
- 3020 rc=ch:gosub22000:rc$=r1$+r2$
- 3040 x=4: gosub 180
- 3042 for z=1 to nf: if z=3 then print
- 3045 kk$(z)=mid$(rc$,s(z),l(z)): rem *** temporarily saves fields ***
- 3050 print"[153]"f$(z);": [155]";tab(12);kk$(z)
- 3060 next: print: if mo<>1 then return
- 3070 print: print"[155] press any key to continue "
- 3080 poke 198,0: wait 198,1: poke 198,0: return
- 3996 rem **********
- 3997 rem add record
- 3998 rem **********
- 3999 :
- 4000 print"[147] [159] add record ": cr=nr+1: rc$="": print
- 4020 print "[155] entries for record number"cr":"
- 4030 print: print: for i=1 to nf: temp$(i)=""
- 4040 if i<>10 then 4046
- 4042 print"[155]tape #? 000[157][157][157][150]";
- 4044 gosub 9000: if t$="" then temp$(i)="000": goto 4055
- 4045 goto 4050
- 4046 print"[155]"f$(i)"?"
- 4048 print"[145][150]";: gosub 9000: if t$="" then goto 4048
- 4050 temp$(i)=left$(t$+sp$,l(i))
- 4055 rc$=rc$+temp$(i): next: print
- 4060 print"[147]": print"[147] [159] add record ": print
- 4065 gosub 3040: print
- 4070 print" ok? < y or n >[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";
- 4080 get v$: if (v$<>"n") and (v$<>"y") then 4080
- 4090 if v$="n" then rc$="": gosub 8000: return
- 4100 print" "
- 4110 nr=cr:r1$="":r2$=""
- 4120 ia$(nr)=temp$(1)+mid$(str$(nr),2): ib$(nr)=temp$(2)+mid$(str$(nr),2)
- 4130 ic$(nr)=temp$(10)+mid$(str$(nr),2)
- 4140 fori=1to8:r1$=r1$+temp$(i):next
- 4150 fori=9tonf:r2$=r2$+temp$(i):next
- 4155 rem write record to rel.file & update index
- 4160 gosub 21000: if er=70 then 4190
- 4165 gosub 1000: gosub 500
- 4170 print"[145][158] enter another record?"
- 4180 get k$: if (k$<>"y") and (k$<>"n") then 4180
- 4185 if k$="y" then 4000
- 4190 gosub 8000: return
- 4200 print"[145]"sp$:print"[145]";:return
- 4996 rem *********
- 4997 rem edit
- 4998 rem *********
- 4999 :
- 5000 if nr=0 then gosub 2002: return
- 5010 cr$="":cr=0:gosub5900
- 5020 print"[158]enter record [146] number to edit or": print
- 5025 print tab(13) "[159]i[146][158]ndex or [159]q[146][158]uit": print
- 5030 get cr$: if cr$="" then 5030
- 5031 if cr$="i" or cr$="q" then 5040
- 5032 printchr$(13)spc(5)"[155]enter record #";cr$;: ct=1: t$=cr$: gosub 9510
- 5035 cr=val(t$)
- 5040 if cr$="i" then gosub 6000: poke198,0: goto 5000
- 5050 if cr$="q" then gosub 8000: return
- 5060 if (cr<1) or (cr>nr) then print: gosub 620: print" [145]": goto 5030
- 5096 rem *******************************
- 5097 rem display selected record to edit
- 5098 rem *******************************
- 5099 :
- 5100 gosub 5900: rc=cr: gosub 22000: rc$=r1$+r2$
- 5110 print: gosub 3040: rem *** line 3050 saves title, star and tape# ***
- 5120 rc$="": x=4: gosub 180
- 5130 for i=1 to nf: if i=3 then print
- 5140 print tab(10)"[150]?";: gosub 9000: rem *** get input (t$) from kbd ***
- 5142 if t$="" then temp$(i)=kk$(i): goto 5150
- 5145 temp$(i)=left$(t$+sp$,l(i))
- 5150 rc$=rc$+temp$(i): next
- 5152 print: print"[155] ok? < y or n >[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";
- 5155 get k$: if (k$<>"n") and (k$<>"y") then goto 5155
- 5160 if k$="n" then 5000
- 5162 print" "
- 5165 r1$="": r2$="": for z=1 to 8
- 5170 r1$=r1$+temp$(z): next: for z=9 to nf: r2$=r2$+temp$(z): next
- 5176 rem check indices
- 5177 :
- 5180 p1=0: p2=0: p3=0: p4=0
- 5190 if kk$(1)<>temp$(1) then gosub 5400: p1=1
- 5200 if kk$(2)<>temp$(2) then gosub 5450: p2=1
- 5210 if kk$(nf)<>temp$(nf) then gosub 5500: p3=1
- 5220 p4=p1+p2+p3
- 5230 gosub 21000: rem *** rewrite record ***
- 5240 if er>0 then goto 5300: rem *** bad file ***
- 5250 if p4>0 then gosub 1000: gosub 500: rem *** index changed-resave ***
- 5300 goto5000
- 5400 :
- 5402 rem ia$ index changed
- 5410 forz=1tonr:ifmid$(ia$(z),21)<>mid$(str$(cr),2)thengoto5430
- 5420 ia$(z)=temp$(1)+mid$(str$(cr),2): z=nr
- 5430 next:return
- 5440 :
- 5450 forz=1tonr:ifmid$(ib$(z),21)<>mid$(str$(cr),2)thengoto5470
- 5460 ib$(z)=temp$(2)+mid$(str$(cr),2): z=nr
- 5470 next:return
- 5480 :
- 5500 forz=1tonr:ifmid$(ic$(z),4)<>mid$(str$(cr),2)thengoto5520
- 5510 ic$(z)=temp$(10)+mid$(str$(cr),2): z=nr
- 5520 next:return
- 5900 :
- 5910 print"[147][159] edit record ";
- 5915 if cr then print"#"cr"[157] <cr> for ok ": goto 5930
- 5920 print: print
- 5930 return
- 6000 rem *********
- 6002 rem display index
- 6004 rem *********
- 6010 pg=0:x$="title":t$="title record #":gosub6500:gosub2600
- 6020 w=1: print"[158]";: for i=1tonr
- 6025 print left$(ia$(i),20)" "mid$(ia$(i),21): gosub 6600
- 6030 next: pg=0: x$="star": t$="name record #"
- 6035 gosub 6610: gosub 2600
- 6040 w=1: print"[158]";: fori=1tonr
- 6045 print ib$(i): gosub 6600
- 6050 next: pg=0: x$="tape #"
- 6055 t$="tape # record #": gosub 6610: gosub 2600
- 6060 w=1: print"[158]";: for i=1tonr
- 6065 print left$(ic$(i),3) tab(20) mid$(ic$(i),4): gosub 6600
- 6070 next
- 6080 gosub 3070: return
- 6500 pg=pg+1: print "[147][158] index.....by "x$: printtab(30) "[145]page "pg: return
- 6600 ifi/15<>int(i/15)thengoto6630
- 6610 ifmo=1thengosub3070:goto6630
- 6620 gosub3070:gosub6500
- 6630 ifw=1thenprint"[155]";:w=0:goto6650
- 6640 ifw=0thenprint"[158]";:w=1
- 6650 ifi/15=int(i/15)thengosub2600
- 6660 return
- 6996 rem ***************
- 6997 rem printer options
- 6998 rem ***************
- 7000 gosub 8600: rem *** clear text areas ***
- 7005 x=6: gosub 180
- 7010 print" print options [150]": print
- 7015 print" tape l[150]abel": print
- 7020 print" listing by:"
- 7025 print" movie t[150]itle"
- 7030 print" s[150]tar"
- 7040 print" tape n[150]umber"
- 7050 print: print" m[150]ain menu"
- 7060 getp$: if p$="" then 7060
- 7080 if p$="m" then gosub 8600: return
- 7082 if p$="l" then gosub 7100: goto 7095
- 7084 if (p$="t") or (p$="s") or (p$="n") then gosub 7600: goto 7095
- 7090 goto7060
- 7095 if de<>4 then gosub 8000: return
- 7096 gosub 185: print"[155] press any key to continue "
- 7097 gosub 3080: print "[147]": gosub 8000: return
- 7100 x=21: gosub 180
- 7105 print"[153] enter the tape number "
- 7110 print" you want to print a label for "
- 7120 for i=1 to 4: fo$(i)="": next
- 7130 ex=0: k=1: print"[153] ";: gosub 9500
- 7135 if ex=1 then gosub 8000: return
- 7140 cr$=t$: cr=val(cr$): j=0
- 7150 de=4: sc$="": rv$=chr$(14): c1$="": c2$=""
- 7160 if de=3 then sc$=chr$(147): rv$=chr$(18): c1$=chr$(5): c2$=chr$(152)
- 7200 for i=1 to nr: a=val(left$(ic$(i),3)): b$=mid$(ic$(i),4)
- 7220 if a=cr then j=j+1: fo$(j)=b$: a$=left$(ic$(i),3)
- 7240 next: if j<>0 then goto 7255
- 7245 print: print"[145][145][153] "
- 7250 print: print"[145][153] [150] file not found [153] ": goto 7520
- 7255 x=20: gosub 180
- 7256 for x=1to4: print"[153] ": next
- 7260 print"[145][145][145][153] is printer ready? < y/n > "
- 7262 get k$: if (k$<>"y") and (k$<>"n") then 7262
- 7264 if k$="n" then return
- 7265 ifj>4thenj=4
- 7270 open4,de: if (st and 128) then gosub 9700: gosub 8000: return
- 7275 if de=4 then print#4,chr$(27);"[194]";chr$(3);
- 7300 p=0:fori=1toj:rc=val(fo$(i)): gosub22000:p=p+1:rc$(p)=r1$+r2$:next
- 7304 rem fields 1,4,5,6,7 - title,start,end,speed,time
- 7310 fori=1tojstep4:x$=" ": print#4,mid$(rc$(1),s(1),l(1));
- 7320 ifj>1thenprint#4,x$;mid$(rc$(2),s(1),l(1));
- 7330 ifj>2thenprint#4,x$;mid$(rc$(3),s(1),l(1));
- 7340 ifj>3thenprint#4,x$;mid$(rc$(4),s(1),l(1));
- 7350 print#4
- 7410 fork=4to7:x$=left$(sp$,21-l(k))
- 7420 print#4,mid$(rc$(1),s(k),l(k));
- 7430 ifj>1thenprint#4,x$;mid$(rc$(2),s(k),l(k));
- 7440 ifj>2thenprint#4,x$;mid$(rc$(3),s(k),l(k));
- 7450 ifj>3thenprint#4,x$;mid$(rc$(4),s(k),l(k));
- 7455 ifk>6thenprint#4,rv$;" # :";a$
- 7460 print#4:next
- 7470 next:gosub185
- 7480 print"[153] another copy of same label "
- 7485 print" < y/n >[157][157][157][157][157][157][157]";
- 7490 get k$: if (k$<>"y") and (k$<>"n") then 7490
- 7495 : print" ": if k$="y" then 7310
- 7500 ifde=4thenprint#4,chr$(27);"[194]";chr$(1);
- 7510 print#4,chr$(0);:close4
- 7520 return
- 7596 rem **********************
- 7597 rem lists and list devices
- 7598 rem **********************
- 7599 :
- 7600 x=21: gosub 180
- 7602 print"[153] "
- 7604 print" "
- 7605 print"[145][145]s[153]creen or p[153]rinter"
- 7606 get k$: if (k$<>"s") and (k$<>"p") then 7606
- 7608 de=4: if k$="s" then de=3
- 7610 sc$=chr$(12): c1$="": c2$=""
- 7615 ifde=3thensc$=chr$(147):c1$="[155]": c2$="[158]"
- 7620 open 4,de: if (st and 128) then gosub 9700: return
- 7625 print#4,sc$
- 7630 pa=0: gosub 7900: fori=1tonr
- 7635 get k$: if k$="q" then i=nr: goto7750: rem *** interrupt & abort ***
- 7640 if p$="t" then x$=ia$(i): x=21
- 7650 if p$="s" then x$=ib$(i): x=21
- 7660 if p$="n" then x$=ic$(i): x=4
- 7670 x$=mid$(x$,x): x=val(x$): rc=x: gosub 22000: rc$=r1$+r2$
- 7672 if er<>0 then i=nr: goto 7740
- 7677 print#4,i;: if i<10 then print#4," ";
- 7678 if i<100 then print#4," ";
- 7679 print#4," ";
- 7680 print#4,mid$(rc$,s(1),l(1));" ";
- 7690 print#4,mid$(rc$,s(2),l(2));" ";
- 7700 fork=4to9
- 7710 print#4,mid$(rc$,s(k),l(k));" ";
- 7720 next:print#4," ";mid$(rc$,s(10),l(10))
- 7725 ln=ln+1
- 7730 if ln>58 then for bz=1to3: print#4,chr$(7);: gosub 370: next
- 7735 if ln>58 then gosub 3070: print#4,sc$: gosub7900
- 7740 next
- 7750 if de=4 then print#4,sc$
- 7760 close 4: if de=4 then return
- 7765 print"[158] press space bar to continue"
- 7770 get k$: if k$<>chr$(32) then 7770
- 7780 return
- 7900 :
- 7901 pa=pa+1:print#4,c1$;"video tape list by: ";c2$;
- 7902 ifp$="t"thenprint#4,"movie title";
- 7903 ifp$="s"thenprint#4,"star name ";
- 7904 ifp$="n"thenprint#4,"tape number";
- 7906 if de=4 then print#4,spc(6);
- 7908 print#4,spc(30);c1$;"page:";pa;chr$(13): rem *** page header ***
- 7910 print#4,spc(8);"title";
- 7915 print#4,spc(15);"star";
- 7920 print#4,spc(13);"start end sp time year type tape #"
- 7925 ifde=4thenprint#4,spc(4);
- 7930 li$=lp$:ifde=3thenli$=ls$: rem *** default is for printer ***
- 7940 print#4,li$;li$;:ln=3
- 7950 ifde=4thenprint#4,li$;li$
- 7960 print#4,c2$:ln=ln+1:return
- 7997 :
- 7998 rem *** screen display ***
- 7999 :
- 8000 print"[147][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
- 8110 print"[221][159] [219] [219] [219] [219] [219] [159] [219] [219] [219] [219] [219] [146][221]"
- 8120 print"[221][159] [219][219][219][219][219][219][219][219][219][219] video phile [159][219][219][219][219][219][219][219][219][219][219] [146][221]"
- 8140 print"[221][159] [219] [219] [219] [219] [219] [159] [219] [219] [219] [219] [219] [146][221]"
- 8150 print"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
- 8200 ss$="[221][150] [146][221]"+chr$(158)+" [146][221]"
- 8220 for x=1to14: printss$: next
- 8230 print"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
- 8240 ss$="[221][153] [146][221]"
- 8250 printss$: printss$: printss$: printss$
- 8260 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
- 8280 print"[145][145][145][145]";
- 8282 print"[153](c)1986 by michael reich"
- 8285 print"[153]published by softdisk publishing,inc."
- 8290 gosub 940
- 8300 return
- 8496 rem ***************
- 8497 rem print cassette
- 8498 rem ***************
- 8499 :
- 8500 print""d$
- 8505 gosub 190: print"[158][169] "
- 8510 gosub 190: printr$"[155][176][192][192][192][192][192][192][192][192][192][174][146] "
- 8515 gosub 190: printr$"[194][213][192][192][201] [213][192][192][201][194][146] "
- 8520 gosub 190: printr$"[221][221]()[221] [221]()[221][221][146] "
- 8530 gosub 190: printr$"[221][202][192][192][203] [202][192][192][203][221][146] "
- 8540 gosub 190: printr$"[221]"n$"[221][146] "
- 8550 gosub 190: printr$"[173]=========[189][158][169]"
- 8560 return
- 8596 rem ***************
- 8597 rem clear text area
- 8598 rem ***************
- 8599 :
- 8600 x=6: gosub 180
- 8610 for x=1 to 13
- 8620 print"[150] "
- 8630 next
- 8640 return
- 8996 rem ************
- 8997 rem get keypress
- 8998 rem ************
- 8999 :
- 9000 t$="": ct=0
- 9010 get k$: if k$="" then 9010
- 9015 k=asc(k$)
- 9020 if k=44 then 9010: rem *** comma ***
- 9025 if k=13 then 9200: rem *** <cr> ***
- 9030 if k<>20 then 9100: rem *** other than delete ***
- 9040 if ct=0 then 9010
- 9050 print"[157] [157]";: ct=ct-1: t$=left$(t$,ct)
- 9060 goto 9010
- 9100 if ct=20 then 9010
- 9110 if ((k>31) and (k<96)) or ((k>192) and (k<219)) then 9130
- 9120 goto 9010
- 9130 printk$;: ct=ct+1: t$=t$+k$: goto 9010
- 9200 print: return
- 9496 rem ********************
- 9497 rem input rec # from kbd
- 9498 rem ********************
- 9499 :
- 9500 ct=0: t$=""
- 9510 get k$: if k$="" then 9510
- 9520 if k$=chr$(13) then 9600
- 9530 if k$<>chr$(20) then 9560
- 9540 if ct=0 then 9510
- 9550 print"[157] [157]";: ct=ct-1: t$=left$(t$,ct): goto 9510
- 9560 if (ct=3) then 9510
- 9570 if (k$<chr$(48)) or (k$>chr$(57)) then 9510
- 9580 if k=0 then k=1: print" [157][157][157][157][157][157][157][157][157][157]";
- 9590 printk$;: ct=ct+1: t$=t$+k$: goto 9510
- 9600 if ct=0 then ex=1: return
- 9610 if (val(t$)<=nr) and (val(t$)<>0) then return
- 9620 printleft$("[157][157][157]",ct)+left$(" ",ct)+left$("[157][157][157]",ct);: goto 9500
- 9700 x=20: gosub 180
- 9710 for x=1to4: print"[153] ": next
- 9720 print"[145][145][145][153] [150] printer not ready [153] "
- 9730 print" press space bar to continue "
- 9740 get k$: if k$<>chr$(32) then 9740
- 9750 return
- 9800 x=6: gosub 180
- 9805 print"[150] video tape"
- 9810 print" cataloging"
- 9815 print" system"
- 9820 print"[150] 1[150]- run it"
- 9825 print"[150] 2[150]- read about it"
- 9830 get k$: if (k$<>"1") and (k$<>"2") then 9830
- 9835 if k$="2" then gosub 10000: gosub 8000: goto 9850
- 9840 x=6: gosub 180
- 9845 for x=1to11: print"[150] ": next
- 9850 return
- 10000 print"[147]"
- 10010 printspc(14)"[155]video phile"
- 10020 printspc(11)"by michael reich"
- 10025 print" video phile is a database library"
- 10026 print"used to keep track of a video tape col- lection, using relative ";
- 10027 print"files and a se- quential file index. it will provide"
- 10028 print"printed labels for the video tapes as well as a listing of your ";
- 10029 print"collection sorted several ways to provide easy location of";
- 10030 print" your tapes."
- 10035 gosub 11000
- 10040 print"[147] each video phile record contains"
- 10041 print"10 fields of information:"
- 10042 print" 1) movie title
- 10043 [153]" 2) star name
- 10044 print" 3) co-star name
- 10045 [153]" 4) vcr counter- start
- 10046 print" 5) vcr counter- stop
- 10047 [153]" 6) vcr running speed
- 10048 print" 7) running time- mins
- 10049 [153]" 8) year (ex. 1987)
- 10050 print" 9) type (color or b&w)
- 10051 [153]" 10) tape number
- 10052 print" the title, star, and tape number"
- 10053 print"are the fields which make up the in-"
- 10054 print"dices."
- 10055 gosub 11000
- 10060 print"[147] the first thing that needs to be"
- 10061 print"done is to create the relative file"
- 10062 print"with the create option in the menu."
- 10063 print"of course, that's provided it hasn't"
- 10064 print"been done already"
- 10065 print" while 'create' is only used once"
- 10066 print"to create the relative file, an index"
- 10067 print"file is constantly being modified and"
- 10068 print"read to keep track of the data in the"
- 10069 print"main video file. this file is read"
- 10070 print"when the program is first run and se-"
- 10071 print"veral times thereafter."
- 10075 gosub 11000
- 10080 print"[147] this index file, a seq file, "
- 10081 print"contains sorted lists of the titles,"
- 10082 print"stars, and tape numbers, of the tapes"
- 10083 print"you've entered into the database."
- 10084 print"these lists are sorted on the first"
- 10085 print"character of each field as they were"
- 10086 print"entered, except the tape number index,"
- 10087 print"which is sorted numerically."
- 10088 print" this file is updated on every mod-"
- 10089 print"ification to the main video file."
- 10090 gosub 11000
- 10100 print"[147] video phile is a menu driven"
- 10110 print"program with prompts, so there is no"
- 10120 print"guess work involved. simly follow the"
- 10130 print"prompts as they are given and before"
- 10140 print"long, your entire video library will"
- 10150 print"be nicely and neatly cataloged."
- 10160 print" have fun!"
- 10170 gosub 11000
- 10180 return
- 11000 x=23: gosub 180
- 11010 print" press <cr> to continue"
- 11020 getk$: if k$<>chr$(13) then 11020
- 11030 return
- 19996 rem **********************
- 19997 rem create a relative file
- 19998 rem **********************
- 19999 :
- 20000 x=21: gosub 180
- 20010 print"[153] "
- 20020 print"[145] standbye...creating relative file"
- 20030 a2=n: rem *** # of records +1 ***
- 20040 a1=88: rem *** record length +2 ***
- 20050 hb=int(a2/256): lb=a2-(hb*256)
- 20060 close15: open15,8,15,"i0"
- 20062 print#15,"s0:video phile data"
- 20065 print#15,"s0:video.index ": nr=0
- 20070 open1,8,2,"video phile data,l,"+chr$(a1)
- 20080 print#15,"p"+chr$(2+96)+chr$(lb)+chr$(hb)+chr$(1)
- 20090 print#1,"end"
- 20100 input#15,er,er$,et,es
- 20110 close 1: close 15: if er=50 then goto 20160
- 20120 x=21: gosub 180
- 20130 print"[153] "
- 20135 sp=int((40-len(er$))/2)
- 20140 print"[145]"spc(sp-1)""er$
- 20150 for x=1to 1750: next
- 20160 gosub 8000: return
- 21000 rem *********
- 21002 rem write record to rel.file
- 21004 rem *********
- 21010 close15:close1:gosub470
- 21020 open1,8,2,"video phile data,l"
- 21030 hb=int(cr/256):lb=cr-(hb*256)
- 21040 print#15,"p"+chr$(2+96)+chr$(lb)+chr$(hb)+chr$(1)
- 21050 print#1,r1$;chr$(13);r2$:close1:gosub410:close15:ifer=0thengoto21080
- 21060 gosub22200:gosub180:print"[152]press return ";
- 21070 input"to attempt save [214][157][157][157]";key$:gosub22300:goto21000
- 21080 ifer=0thengosub185:print"record "cr" written":in=75:gosub380
- 21090 return
- 22000 rem *********
- 22002 rem read record from rel.file
- 22004 rem *********
- 22010 gosub470:r1$="":r2$=""
- 22020 open1,8,2,"video phile data"
- 22030 hb=int(rc/256):lb=rc-(hb*256)
- 22040 print#15,"p"+chr$(2+96)+chr$(lb)+chr$(hb)+chr$(1)
- 22050 input#1,r1$,r2$:close1:gosub410: close15:ifer=0thenreturn
- 22070 gosub22200:x=2:gosub180: return
- 22100 :
- 22150 q=abs(1-q):gosub185
- 22155 ifq=0thenprint"";
- 22160 ifq=1thenprint"[146]";: if de=4 then print"[153]";
- 22170 print" data file missing - check disk!!! "
- 22180 in=25:gosub380:return
- 22200 :
- 22210 ifer=70thenforg=1to15:x=22: gosub22150:next:gosub22300
- 22220 ifer<>70thenprint"disk status:"er$
- 22230 return
- 22300 gosub 185: if de=4 then print"[153]";
- 22400 print sp$: return
- 55000 rem *********
- 55002 rem quick sort routine
- 55004 rem *********
- 55020 fort=1tonr:m%(t)=2*t:next: rem array to sort is in q1$
- 55040 s%(1)=1:s%(2)=nr:p=2
- 55060 l=s%(p):p=p-1:f=s%(p):p=p-1:i=f
- 55080 j=l:d$=q1$((f+l)/2)
- 55100 gosub55300:ifq1$(i)<d$theni=i+1: goto55100
- 55120 gosub55300:ifq1$(j)>d$thenj=j-1: goto55120
- 55140 ifi<=jthenq2$=q1$(i):q1$(i)=q1$(j) :q1$(j)=q2$:i=i+1:j=j-1
- 55160 gosub55300:ifi<=jthengoto55100
- 55180 iff<jthenp=p+1:s%(p)=f:p=p+1: s%(p)=j
- 55200 f=i:iff<lthengoto55080
- 55220 ifp<>0thengoto55060
- 55230 return
- 55240 :
- 55300 onsogosub1770,1780:rem show time
- 55310 return
-