home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1993 June / 1993-06.d64 / vts (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  9KB  |  266 lines

  1. 0 clr
  2. 1 poke53280,6:poke53281,6:print"[147]"
  3. 2 rem copyright 1993 - compute publications intl ltd - all rights reserved
  4. 5 poke 53280,.:poke53281,.:rt$=chr$(13):b$="                    "
  5. 10 et$="----- end of tape ------":ds$="------------------------
  6. 15 [129]x[178]679[164]700:[135]a:[151]x,a:[130]:a[178]679:[134]mt$(30)
  7. 20 [134] mn$(451),tn%(451),tp%(451),pf%(451),pb%(451),li%(200),al%(27),mt%(2251)
  8. 25 [129]x[178]1[164]30:[135]mt$(x):[130]
  9. 30 [153]"loadopen     *** video tape supervisor ***":[153]"for help enter sysh
  10. 35 ln=6:gosub245:sysa,.,6:c$="":input"command";c$:ifc$=""then30
  11. 40 ifc$="f"thenprint""fre(.):gosub135:ln=8:gosub245:goto35
  12. 45 ifleft$(c$,2)="l "thenf$=right$(c$,(len(c$)-2)):goto725
  13. 50 ifc$="q"then140
  14. 55 ifc$="h"then960
  15. 60 ifc$="ct"then1015
  16. 65 ifleft$(c$,2)="a "then285
  17. 70 ifleft$(c$,3)="lt "then565
  18. 75 ifnm=.thenprint"must load movies":gosub190:ln=9:gosub245:goto35
  19. 80 ifc$="lo"then800
  20. 85 ifc$="la"then445
  21. 90 ifc$="lt"orc$="pt"then500
  22. 95 ifc$="pa"then615
  23. 100 ifc$="lm"orc$="pm"then700
  24. 105 ifleft$(c$,2)="s "thenf$=right$(c$,(len(c$)-2)):goto765
  25. 110 ifleft$(c$,3)="ll "then665
  26. 115 ifleft$(c$,2)="c "then1145
  27. 120 ifleft$(c$,2)="d "then835
  28. 125 ifleft$(c$,3)="cm "then395
  29. 130 goto35
  30. 135 sysa,.,23:print"hit any key to return":wait198,15:geta$:goto30
  31. 140 print"are you sure? (y/n)
  32. 145 [161]a$:[139]a$[179][177]"y"[175]a$[179][177]"n"[167]145
  33. 150 [139]a$[178]"n"[167]ln[178]9:[141]245:[137]35
  34. 155 [158]64738
  35. 160 a$[178]"":[153]"sysq to stop, any key to continue":[146]198,15:[161]a$:[142]
  36. 165 ap[178][198]([200](x$,1))[171]63:[139]ap[179].[167]ap[178]1
  37. 170 [142]
  38. 175 [159]2,8,2,f$[170]",p,r":[160]2:[159]15,8,15:[132]15,z,z$:[160]15
  39. 180 [139]z[178]62[167][153]"no such file":[141]190
  40. 185 [142]
  41. 190 [129]x[178]1[164]2000:[130]:[142]
  42. 195 [158]a,.,20:[153]"max of 200 tapes and 450 movies":[141]190
  43. 200 ln[178]20:[141]245:[142]
  44. 205 [158]a,.,20:[153]"stop tape must not be < start tape
  45. 210 gosub190:ln=20:gosub245:return
  46. 215 m$="":input"movie name";m$:iflen(m$)>66thenprint"[145][145][145][145][145]":goto215
  47. 220 return
  48. 225 ifright$(p$,4)=".the"thenp$="the "+left$(p$,len(p$)-4)
  49. 230 return
  50. 235 ifleft$(p$,4)="the "thenp$=right$(p$,len(p$)-4)+".the"
  51. 240 return
  52. 245 poke781,ln:sys59903:return
  53. 250 printtn%(w)" ";:iftn%(w)<10thenprint" ";
  54. 255 iftn%(w)>99thenprint"[157]";
  55. 260 iflen(mn$(w))>34thenln=34:m=7:goto270
  56. 265 print"[158]"p$"":z=z+1:return
  57. 270 z=z+2:forq=lnto1step-1:ifmid$(p$,q,1)=" "then280
  58. 275 next:return
  59. 280 print"[158]";left$(p$,q):printspc(m);right$(p$,(len(p$)-q));"":q=.:goto275
  60. 285 iflen(c$)=3thenc=val(right$(c$,1)):goto295
  61. 290 c=val(right$(c$,3))
  62. 295 ifc<1orc>200ornm=450thengosub195:goto35
  63. 300 print"[147]":gosub215:ifm$=""then30
  64. 305 p$=m$:gosub235:x$=p$:gosub165
  65. 310 cp=al%(ap):gosub315:gosub370:cp=nm:gosub1085:goto300
  66. 315 ifnm>.then325
  67. 320 pf%(1)=.:pb%(1)=.:nm=.:gosub390:al%(ap)=1:return
  68. 325 ifcp>.then335
  69. 330 gosub390:al%(ap)=nm:pf%(nm)=.:pb%(nm)=.:return
  70. 335 ifmn$(cp)<x$then345
  71. 340 gosub390:al%(ap)=nm:pf%(nm)=cp:pb%(nm)=.:pb%(cp)=nm:return
  72. 345 pc=nm+1:mn$(pc)=x$:tn%(pc)=c
  73. 350 ifmn$(cp)>x$then365
  74. 355 ifpf%(cp)=.thenpb%(pc)=cp:pf%(cp)=pc:nm=nm+1:return
  75. 360 cp=pf%(cp):goto350
  76. 365 pf%(pc)=cp:pb%(pc)=pb%(cp):pf%(pb%(cp))=pc:pb%(cp)=pc:nm=nm+1:return
  77. 370 ifli%(c)=.thenli%(c)=nm:return
  78. 375 cp=li%(c)
  79. 380 iftp%(cp)=.thentp%(cp)=nm:return
  80. 385 cp=tp%(cp):goto380
  81. 390 nm=nm+1:mn$(nm)=x$:tn%(nm)=c:return
  82. 395 iflen(c$)=4thenin=val(right$(c$,1)):goto405
  83. 400 in=val(right$(c$,3))
  84. 405 ifin<1orin>200thengosub195:goto35
  85. 410 cp=li%(in):ifcp=.thenprint"[158]no movies on tape":goto135
  86. 415 p$=mn$(cp):gosub225:print"[147]":iflen(p$)>38thenln=38:m=2:gosub270:goto425
  87. 420 print"[158]"p$"
  88. 425 [153]"change?(y, n or q)":[146]198,15:[161]a$:[139]a$[178]"y"[167][141]1085
  89. 430 [139]a$[178]"q"[167]30
  90. 435 [153]"load":cp[178]tp%(cp):[139]cp[178].[167]30
  91. 440 [137]415
  92. 445 [153]"load
  93. 450 z=.:forx=1to27:ap=al%(x)
  94. 455 ifap=.then490
  95. 460 ifc$="lm"thenforw=ap*5-4toap*5:ifmt%(w)=ythenw=ap*5:next:goto470
  96. 465 ifc$="lm"thennext:goto475
  97. 470 p$=mn$(ap):gosub225:w=ap:gosub250
  98. 475 ap=pf%(ap):ifz<20then455
  99. 480 gosub160:ifa$="q"thenx=27:goto490
  100. 485 print"[147]":z=.:goto455
  101. 490 next:ifa$="q"then30
  102. 495 goto135
  103. 500 sw$="":ln=10:gosub245:sysa,.,10:input"start tape #";sw$:ifsw$=""then30
  104. 505 sw=val(sw$):ifsw<1orsw>200thengosub195:goto500
  105. 510 tw$="":ln=13:gosub245:sysa,.,13:input"stop tape #";tw$:iftw$=""then30
  106. 515 tw=val(tw$):iftw<swthengosub205:goto510
  107. 520 iftw<1ortw>200thengosub195:goto510
  108. 525 ifc$="pt"then590
  109. 530 forx=swtotw:cp=li%(x):print"[147]tape"x:printds$
  110. 535 p$=mn$(cp):gosub225:iflen(p$)>38thenln=38:m=2:gosub270:goto545
  111. 540 print"[158]"p$""
  112. 545 iftp%(cp)=.then555
  113. 550 cp=tp%(cp):goto535
  114. 555 printet$:gosub160:ifa$="q"thenx=tw
  115. 560 next:goto30
  116. 565 iflen(c$)<4then35
  117. 570 iflen(c$)=4thenc=val(right$(c$,1)):goto580
  118. 575 c=val(right$(c$,3))
  119. 580 ifc<1orc>200thengosub195:goto35
  120. 585 sw=c:tw=c:goto530
  121. 590 open4,4,1:forc=swtotw
  122. 595 print#4:print#4,"     ** tape"c"**":print#4:cp=li%(c)
  123. 600 p$=mn$(cp):gosub225:print#4,"     ";p$:iftp%(cp)=.then610
  124. 605 cp=tp%(cp):goto600
  125. 610 print#4:print#4:next:close4:goto30
  126. 615 open4,4,1:print#4,chr$(14);"   alphabetical list":print#4,chr$(15)
  127. 620 forx=1to27:ap=al%(x)
  128. 625 ifap=.thennext:close4:goto30
  129. 630 ifc$="pm"thenforw=ap*5-4toap*5:ifmt%(w)=ythenw=ap*5:next:goto640
  130. 635 ifc$="pm"thennext:goto660
  131. 640 p$=mn$(ap):gosub225
  132. 645 print#4,"     ";tn%(ap)" ";:iftn%(ap)<10thenprint#4," ";
  133. 650 iftn%(ap)<100thenprint#4," ";
  134. 655 print#4,p$
  135. 660 ap=pf%(ap):goto625
  136. 665 z=.:x$=right$(c$,(len(c$)-3)):print"[147]":lg=len(x$):gosub165
  137. 670 cp=al%(ap)
  138. 675 ifcp=.then135
  139. 680 p$=mn$(cp):ifleft$(p$,lg)>x$then135
  140. 685 ifleft$(p$,lg)<x$then695
  141. 690 gosub225:w=cp:gosub250:ifz=20thengosub160:z=.:print"[147]":ifa$="q"then30
  142. 695 cp=pf%(cp):goto675
  143. 700 cp=.:gosub1050:z=.
  144. 705 ln=2:gosub245:x$="":input"number";x$:ifx$=""then30
  145. 710 y=val(x$):ify<1ory>30then705
  146. 715 ifc$="lm"thenprint"[147][159]"spc(20-len(mt$(y))/2);mt$(y)"":goto450
  147. 720 open4,4,1:print#4,chr$(14);"   ";mt$(y):print#4,chr$(15):goto620
  148. 725 gosub175:ifz=62then30
  149. 730 f$=f$+",s,r":open8,8,8,f$:input#8,nm:nt=nm*5
  150. 735 print"loading[158]"nm"movies....
  151. 740 [129]x[178]1[164]nm:[132]8,mn$(x):[132]8,tn%(x):[132]8,tp%(x):[132]8,pf%(x)
  152. 745 [132]8,pb%(x):[130]:[153]"loading info for sys200 tapes...
  153. 750 forx=1to200:input#8,li%(x):next:forx=1to27:input#8,al%(x):next
  154. 755 forx=1tont:input#8,mt%(x):next
  155. 760 forx=1to30:input#8,mt$(x):next:close8:goto135
  156. 765 f$="@0:"+f$+",s,w":open8,8,8,f$:print#8,nm:nt=nm*5
  157. 770 print"saving[158]"nm"movies....
  158. 775 [129]x[178]1[164]nm:[152]8,mn$(x);rt$;tn%(x);rt$;tp%(x);rt$;pf%(x);rt$;pb%(x)
  159. 780 [130]:[153]"saving info for sys200 tapes...
  160. 785 forx=1to200:print#8,li%(x):next:forx=1to27:print#8,al%(x):next
  161. 790 forx=1tont:print#8,mt%(x):next
  162. 795 forx=1to30:print#8,mt$(x):next:close8:goto135
  163. 800 gosub215:ifm$=""then30
  164. 805 p$=m$:gosub235:x$=p$:gosub165
  165. 810 cp=al%(ap)
  166. 815 ifcp=.ormn$(cp)>p$then830
  167. 820 ifmn$(cp)=p$thenprint"located on tape #[158]"tn%(cp)"":goto135
  168. 825 cp=pf%(cp):goto815
  169. 830 print"movie not found":goto135
  170. 835 iflen(c$)=3thenin=val(right$(c$,1)):goto845
  171. 840 in=val(right$(c$,3))
  172. 845 ifin<1orin>200thengosub195:goto30
  173. 850 sn=.:cp=li%(in):ifcp=.thenprint"[158]no movies on tape":goto135
  174. 855 p$=mn$(cp):gosub225:print"[147]":iflen(p$)>38thenln=38:m=2:gosub270:goto865
  175. 860 print"[158]"p$"
  176. 865 [153]"delete?(y, n or q)":[146]198,15:[161]a$:[139]a$[178]"y"[167]885
  177. 870 [139]a$[178]"q"[167]30
  178. 875 sn[178]cp:cp[178]tp%(cp):[139]cp[178].[167]30
  179. 880 [137]855
  180. 885 [139]sn[177].[167]tp%(sn)[178]tp%(cp)
  181. 890 [139]pb%(cp)[177].[167]pf%(pb%(cp))[178]pf%(cp)
  182. 895 [139]pf%(cp)[177].[167]pb%(pf%(cp))[178]pb%(cp)
  183. 900 x$[178]mn$(cp):[141]165:[139]al%(ap)[178]cp[167]al%(ap)[178]pf%(cp)
  184. 905 [139]li%(tn%(cp))[178]cp[167]li%(tn%(cp))[178]tp%(cp)
  185. 910 [129]y[178]1[164]nm:x[178]y[170]1:[139]y[179]cp[167]920
  186. 915 pf%(y)[178]pf%(x):pb%(y)[178]pb%(x):tn%(y)[178]tn%(x):tp%(y)[178]tp%(x):mn$(y)[178]mn$(x)
  187. 920 [139]pf%(y)[177]cp[167]pf%(y)[178]pf%(y)[171]1
  188. 925 [139]pb%(y)[177]cp[167]pb%(y)[178]pb%(y)[171]1
  189. 930 [139]tp%(y)[177]cp[167]tp%(y)[178]tp%(y)[171]1
  190. 935 [139]y[177]200[167]955
  191. 940 [139]li%(y)[177]cp[167]li%(y)[178]li%(y)[171]1
  192. 945 [139]y[177]27[167]955
  193. 950 [139]al%(y)[177]cp[167]al%(y)[178]al%(y)[171]1
  194. 955