home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1993 June
/
1993-06.d64
/
vts
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
9KB
|
266 lines
0 clr
1 poke53280,6:poke53281,6:print"[147]"
2 rem copyright 1993 - compute publications intl ltd - all rights reserved
5 poke 53280,.:poke53281,.:rt$=chr$(13):b$=" "
10 et$="----- end of tape ------":ds$="------------------------
15 [129]x[178]679[164]700:[135]a:[151]x,a:[130]:a[178]679:[134]mt$(30)
20 [134] mn$(451),tn%(451),tp%(451),pf%(451),pb%(451),li%(200),al%(27),mt%(2251)
25 [129]x[178]1[164]30:[135]mt$(x):[130]
30 [153]"loadopen *** video tape supervisor ***":[153]"for help enter sysh
35 ln=6:gosub245:sysa,.,6:c$="":input"command";c$:ifc$=""then30
40 ifc$="f"thenprint""fre(.):gosub135:ln=8:gosub245:goto35
45 ifleft$(c$,2)="l "thenf$=right$(c$,(len(c$)-2)):goto725
50 ifc$="q"then140
55 ifc$="h"then960
60 ifc$="ct"then1015
65 ifleft$(c$,2)="a "then285
70 ifleft$(c$,3)="lt "then565
75 ifnm=.thenprint"must load movies":gosub190:ln=9:gosub245:goto35
80 ifc$="lo"then800
85 ifc$="la"then445
90 ifc$="lt"orc$="pt"then500
95 ifc$="pa"then615
100 ifc$="lm"orc$="pm"then700
105 ifleft$(c$,2)="s "thenf$=right$(c$,(len(c$)-2)):goto765
110 ifleft$(c$,3)="ll "then665
115 ifleft$(c$,2)="c "then1145
120 ifleft$(c$,2)="d "then835
125 ifleft$(c$,3)="cm "then395
130 goto35
135 sysa,.,23:print"hit any key to return":wait198,15:geta$:goto30
140 print"are you sure? (y/n)
145 [161]a$:[139]a$[179][177]"y"[175]a$[179][177]"n"[167]145
150 [139]a$[178]"n"[167]ln[178]9:[141]245:[137]35
155 [158]64738
160 a$[178]"":[153]"sysq to stop, any key to continue":[146]198,15:[161]a$:[142]
165 ap[178][198]([200](x$,1))[171]63:[139]ap[179].[167]ap[178]1
170 [142]
175 [159]2,8,2,f$[170]",p,r":[160]2:[159]15,8,15:[132]15,z,z$:[160]15
180 [139]z[178]62[167][153]"no such file":[141]190
185 [142]
190 [129]x[178]1[164]2000:[130]:[142]
195 [158]a,.,20:[153]"max of 200 tapes and 450 movies":[141]190
200 ln[178]20:[141]245:[142]
205 [158]a,.,20:[153]"stop tape must not be < start tape
210 gosub190:ln=20:gosub245:return
215 m$="":input"movie name";m$:iflen(m$)>66thenprint"[145][145][145][145][145]":goto215
220 return
225 ifright$(p$,4)=".the"thenp$="the "+left$(p$,len(p$)-4)
230 return
235 ifleft$(p$,4)="the "thenp$=right$(p$,len(p$)-4)+".the"
240 return
245 poke781,ln:sys59903:return
250 printtn%(w)" ";:iftn%(w)<10thenprint" ";
255 iftn%(w)>99thenprint"[157]";
260 iflen(mn$(w))>34thenln=34:m=7:goto270
265 print"[158]"p$"":z=z+1:return
270 z=z+2:forq=lnto1step-1:ifmid$(p$,q,1)=" "then280
275 next:return
280 print"[158]";left$(p$,q):printspc(m);right$(p$,(len(p$)-q));"":q=.:goto275
285 iflen(c$)=3thenc=val(right$(c$,1)):goto295
290 c=val(right$(c$,3))
295 ifc<1orc>200ornm=450thengosub195:goto35
300 print"[147]":gosub215:ifm$=""then30
305 p$=m$:gosub235:x$=p$:gosub165
310 cp=al%(ap):gosub315:gosub370:cp=nm:gosub1085:goto300
315 ifnm>.then325
320 pf%(1)=.:pb%(1)=.:nm=.:gosub390:al%(ap)=1:return
325 ifcp>.then335
330 gosub390:al%(ap)=nm:pf%(nm)=.:pb%(nm)=.:return
335 ifmn$(cp)<x$then345
340 gosub390:al%(ap)=nm:pf%(nm)=cp:pb%(nm)=.:pb%(cp)=nm:return
345 pc=nm+1:mn$(pc)=x$:tn%(pc)=c
350 ifmn$(cp)>x$then365
355 ifpf%(cp)=.thenpb%(pc)=cp:pf%(cp)=pc:nm=nm+1:return
360 cp=pf%(cp):goto350
365 pf%(pc)=cp:pb%(pc)=pb%(cp):pf%(pb%(cp))=pc:pb%(cp)=pc:nm=nm+1:return
370 ifli%(c)=.thenli%(c)=nm:return
375 cp=li%(c)
380 iftp%(cp)=.thentp%(cp)=nm:return
385 cp=tp%(cp):goto380
390 nm=nm+1:mn$(nm)=x$:tn%(nm)=c:return
395 iflen(c$)=4thenin=val(right$(c$,1)):goto405
400 in=val(right$(c$,3))
405 ifin<1orin>200thengosub195:goto35
410 cp=li%(in):ifcp=.thenprint"[158]no movies on tape":goto135
415 p$=mn$(cp):gosub225:print"[147]":iflen(p$)>38thenln=38:m=2:gosub270:goto425
420 print"[158]"p$"
425 [153]"change?(y, n or q)":[146]198,15:[161]a$:[139]a$[178]"y"[167][141]1085
430 [139]a$[178]"q"[167]30
435 [153]"load":cp[178]tp%(cp):[139]cp[178].[167]30
440 [137]415
445 [153]"load
450 z=.:forx=1to27:ap=al%(x)
455 ifap=.then490
460 ifc$="lm"thenforw=ap*5-4toap*5:ifmt%(w)=ythenw=ap*5:next:goto470
465 ifc$="lm"thennext:goto475
470 p$=mn$(ap):gosub225:w=ap:gosub250
475 ap=pf%(ap):ifz<20then455
480 gosub160:ifa$="q"thenx=27:goto490
485 print"[147]":z=.:goto455
490 next:ifa$="q"then30
495 goto135
500 sw$="":ln=10:gosub245:sysa,.,10:input"start tape #";sw$:ifsw$=""then30
505 sw=val(sw$):ifsw<1orsw>200thengosub195:goto500
510 tw$="":ln=13:gosub245:sysa,.,13:input"stop tape #";tw$:iftw$=""then30
515 tw=val(tw$):iftw<swthengosub205:goto510
520 iftw<1ortw>200thengosub195:goto510
525 ifc$="pt"then590
530 forx=swtotw:cp=li%(x):print"[147]tape"x:printds$
535 p$=mn$(cp):gosub225:iflen(p$)>38thenln=38:m=2:gosub270:goto545
540 print"[158]"p$""
545 iftp%(cp)=.then555
550 cp=tp%(cp):goto535
555 printet$:gosub160:ifa$="q"thenx=tw
560 next:goto30
565 iflen(c$)<4then35
570 iflen(c$)=4thenc=val(right$(c$,1)):goto580
575 c=val(right$(c$,3))
580 ifc<1orc>200thengosub195:goto35
585 sw=c:tw=c:goto530
590 open4,4,1:forc=swtotw
595 print#4:print#4," ** tape"c"**":print#4:cp=li%(c)
600 p$=mn$(cp):gosub225:print#4," ";p$:iftp%(cp)=.then610
605 cp=tp%(cp):goto600
610 print#4:print#4:next:close4:goto30
615 open4,4,1:print#4,chr$(14);" alphabetical list":print#4,chr$(15)
620 forx=1to27:ap=al%(x)
625 ifap=.thennext:close4:goto30
630 ifc$="pm"thenforw=ap*5-4toap*5:ifmt%(w)=ythenw=ap*5:next:goto640
635 ifc$="pm"thennext:goto660
640 p$=mn$(ap):gosub225
645 print#4," ";tn%(ap)" ";:iftn%(ap)<10thenprint#4," ";
650 iftn%(ap)<100thenprint#4," ";
655 print#4,p$
660 ap=pf%(ap):goto625
665 z=.:x$=right$(c$,(len(c$)-3)):print"[147]":lg=len(x$):gosub165
670 cp=al%(ap)
675 ifcp=.then135
680 p$=mn$(cp):ifleft$(p$,lg)>x$then135
685 ifleft$(p$,lg)<x$then695
690 gosub225:w=cp:gosub250:ifz=20thengosub160:z=.:print"[147]":ifa$="q"then30
695 cp=pf%(cp):goto675
700 cp=.:gosub1050:z=.
705 ln=2:gosub245:x$="":input"number";x$:ifx$=""then30
710 y=val(x$):ify<1ory>30then705
715 ifc$="lm"thenprint"[147][159]"spc(20-len(mt$(y))/2);mt$(y)"":goto450
720 open4,4,1:print#4,chr$(14);" ";mt$(y):print#4,chr$(15):goto620
725 gosub175:ifz=62then30
730 f$=f$+",s,r":open8,8,8,f$:input#8,nm:nt=nm*5
735 print"loading[158]"nm"movies....
740 [129]x[178]1[164]nm:[132]8,mn$(x):[132]8,tn%(x):[132]8,tp%(x):[132]8,pf%(x)
745 [132]8,pb%(x):[130]:[153]"loading info for sys200 tapes...
750 forx=1to200:input#8,li%(x):next:forx=1to27:input#8,al%(x):next
755 forx=1tont:input#8,mt%(x):next
760 forx=1to30:input#8,mt$(x):next:close8:goto135
765 f$="@0:"+f$+",s,w":open8,8,8,f$:print#8,nm:nt=nm*5
770 print"saving[158]"nm"movies....
775 [129]x[178]1[164]nm:[152]8,mn$(x);rt$;tn%(x);rt$;tp%(x);rt$;pf%(x);rt$;pb%(x)
780 [130]:[153]"saving info for sys200 tapes...
785 forx=1to200:print#8,li%(x):next:forx=1to27:print#8,al%(x):next
790 forx=1tont:print#8,mt%(x):next
795 forx=1to30:print#8,mt$(x):next:close8:goto135
800 gosub215:ifm$=""then30
805 p$=m$:gosub235:x$=p$:gosub165
810 cp=al%(ap)
815 ifcp=.ormn$(cp)>p$then830
820 ifmn$(cp)=p$thenprint"located on tape #[158]"tn%(cp)"":goto135
825 cp=pf%(cp):goto815
830 print"movie not found":goto135
835 iflen(c$)=3thenin=val(right$(c$,1)):goto845
840 in=val(right$(c$,3))
845 ifin<1orin>200thengosub195:goto30
850 sn=.:cp=li%(in):ifcp=.thenprint"[158]no movies on tape":goto135
855 p$=mn$(cp):gosub225:print"[147]":iflen(p$)>38thenln=38:m=2:gosub270:goto865
860 print"[158]"p$"
865 [153]"delete?(y, n or q)":[146]198,15:[161]a$:[139]a$[178]"y"[167]885
870 [139]a$[178]"q"[167]30
875 sn[178]cp:cp[178]tp%(cp):[139]cp[178].[167]30
880 [137]855
885 [139]sn[177].[167]tp%(sn)[178]tp%(cp)
890 [139]pb%(cp)[177].[167]pf%(pb%(cp))[178]pf%(cp)
895 [139]pf%(cp)[177].[167]pb%(pf%(cp))[178]pb%(cp)
900 x$[178]mn$(cp):[141]165:[139]al%(ap)[178]cp[167]al%(ap)[178]pf%(cp)
905 [139]li%(tn%(cp))[178]cp[167]li%(tn%(cp))[178]tp%(cp)
910 [129]y[178]1[164]nm:x[178]y[170]1:[139]y[179]cp[167]920
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)
920 [139]pf%(y)[177]cp[167]pf%(y)[178]pf%(y)[171]1
925 [139]pb%(y)[177]cp[167]pb%(y)[178]pb%(y)[171]1
930 [139]tp%(y)[177]cp[167]tp%(y)[178]tp%(y)[171]1
935 [139]y[177]200[167]955
940 [139]li%(y)[177]cp[167]li%(y)[178]li%(y)[171]1
945 [139]y[177]27[167]955
950 [139]al%(y)[177]cp[167]al%(y)[178]al%(y)[171]1
955