10
20
30
35
40
60
69 os%=FNbyte(0,1,0)
70 ONERRORGOTO32010
90 MODE7:PROCintro
110 MODE4:PROCdisp:REPEATbot%=VPOS:PRINT:UNTILbot%=VPOS
112 DIMcos(60),sin(60)
130 A%=FNbyte(151,96,0)
140 A%=FNbyte(151,98,127)
150 control_byte%=0
160 fade%=FALSE
170 date$="DATE: "+STRING$(13," ")
180 prog$="PROG: "+STRING$(184," ")
190 shot$="SHOT: "+STRING$(13," ")
200 take$="TAKE: "+STRING$(13," ")
202 start_angle%=330
210 VDU26,12
220 PROCslate
222 PROCcentre
240 PROCbox
250 ONERRORGOTO32000
260 PROCdate
270 PROCprog
280 PROCshot
290 PROCclock(1330)
300 END
999
1000
1010
1020 DATA 90,108,180,210,330
1030
1040 DATA "FADE",7,0,"IDENT",0,17
1050 DATA "5",10,6,"1O",6,9,"15",4,14,"2O",6,20,"3O",15,25,"4O",24,20
1060 DATA "",0,0
1999
2000 DEFPROCslate
2010 GCOL0,1
2020 PROCcentre
2030 PROClegend
2040 PROCgrad
2050 PROCarc(180,90,-6,424,16)
2060 PROCarc(210,330,6,424,16)
2070 PROCarc(360,0,-12,120,-16)
2080 ENDPROC
2999
3999
4000 DEFPROCarc(start%,end%,inc%,radius%,wall%)
4010 LOCAL X,Y,angle%
4020 X=1.084*COSRAD(start%):Y=SINRAD(start%)
4030 MOVE X*radius%/xs,Y*radius%/ys:DRAW X*(radius%+wall%)/xs,Y*(radius%+wall%)/ys
4040 FOR angle%=start%+inc% TO end% STEP inc%
4050 X=1.084*COSRAD(angle%):Y=SINRAD(angle%)
4060 PLOT 85,X*radius%/xs,Y*radius%/ys:PLOT 85,X*(radius%+wall%)/xs,Y*(radius%+wall%)/ys
4070 NEXT
4080 ENDPROC
4999
5000 DEFPROCgrad
5010 LOCAL angle%,A%
5020 FOR angle%=90 TO 180 STEP 6:PROCspoke(angle%,424,-24):NEXT
5030 FOR angle%=90 TO 330 STEP 30:PROCspoke(angle%,424,-48):NEXT
5040 FOR angle%=180 TO 210 STEP 6:PROCspoke(angle%,424,16):NEXT
5050 RESTORE1020
5060 FOR A%=1 TO 5:READ angle%:PROCspoke(angle%,424,48):NEXT
5070 ENDPROC
5999
6000 DEFPROCspoke(angle%,radius%,length%)
6010 LOCAL X,Y,X1,Y1
6020 X=radius%*1.084*COSRAD(angle%-1):Y=radius%*SINRAD(angle%-1)
6030 X1=radius%*1.084*COSRAD(angle%+1):Y1=radius%*SINRAD(angle%+1)
6040 cos=1.084*COSRAD(angle%):sin=SINRAD(angle%)
6050 X2=X1+length%*cos:Y2=Y1+length%*sin
6060 X3=X+length%*cos:Y3=Y+length%*sin
6070 MOVE X/xs,Y/ys:DRAW X3/xs,Y3/ys
6080 PLOT 85,X1/xs,Y1/ys:PLOT 85,X2/xs,Y2/ys
6090 ENDPROC
6999
7000 DEFPROCclock(start%)
7010 LOCAL angle%
7012 angle%=start%
7020 REPEAT
7030 IFangle%>1000 angle%=angle%-1000 ELSE angle%=start_angle%
7032 PROCtrig(angle%)
7040 GCOL 3,1
7050 PROCfinger(angle%):
7060 REPEAT
7062 *FX15
7064 REPEAT
7070 VDU28,31,23,39,19
7080 COLOUR129:COLOUR0
7090 PRINTTAB(0,0)"SPACEBAR"'"to start"''" ESCAPE "'"for menu";
7100 COLOUR128:COLOUR1
7120 UNTILFNinkey=48
7130 VDU28,31,23,39,19,12
7140 COLOUR129:COLOUR0
7160 PROClogic_control(angle%)
7170 REPEATUNTIL(TIME-time)MOD100=0
7180 REPEAT
7190 PROCfinger(angle%):IFangle%=156 PROCflash
7192 PROCfinger(angle%-6):
7194 IFangle%=96 VDU19,1,7;0;
7200 angle%=angle%-6
7220 PROClogic_control(angle%)
7230 PROCtone(angle%)
7240 PROCtrig(angle%)
7242 IFfade%=TRUE AND angle%=108 PROCfade
7249 t=TIME+50:REPEATUNTILTIME>t
7250 REPEATUNTIL(TIME-time)MOD100=0
7260 UNTIL(INKEY0=32)OR(angle%<=90)
7270 PROCclear_bit(0)
7280 UNTILangle%<=90
7290 A%=FNbyte(151,96,0)
7300 PROCfinger(angle%):
7310 take%=take%+1
7320 PROCtake
7330 VDU19,1,7;0;
7340 UNTILFALSE
7350 ENDPROC
7999
8000 DEFPROCfinger(angle%)
8010 LOCAL X,Y
8020 GCOL3,1
8030 X=FNcos(angle%):Y=FNsin(angle%)
8040 *FX19
8050 MOVE X*120/xs,Y*120/ys:DRAW X*400/xs,Y*400/ys
8060 ENDPROC
8999
9000 DEFPROClegend
9010 LOCAL X,Y,legend$
9020 down$=CHR$8+CHR$10
9030 RESTORE1040
9040 REPEAT
9050 READ legend$,X%,Y%
9060 IF legend$="IDENT" THEN legend$="I"+down$+"D"+down$+"E"+down$+"N"+down$+"T"
9070 PRINTTAB(X%,Y%);legend$
9080 UNTIL legend$=""
9090 ENDPROC
9999
10000 DEFPROCbox
10010 VDU29,0;0;
10020 VDU28,20,17,38,0
10030 PRINTTAB(0,1)date$;TAB(0,3)prog$;TAB(0,14)shot$;TAB(0,16)take$;
10040 GCOL0,1
10050 MOVE 628/xs,1008/ys:PLOT21,1276/xs,1008/ys
10060 PLOT 21,1276/xs,466/ys:PLOT 21,628/xs,466/ys:PLOT 21,628/xs,1008/ys
10070 MOVE 628/xs,944/ys:PLOT 21,1276/xs,944/ys
10080 MOVE 628/xs,592/ys:PLOT 21,1276/xs,592/ys
10090 MOVE 628/xs,528/ys:PLOT 21,1276/xs,528/ys
10100 PROCcentre
10110 ENDPROC
10999
11000 DEFPROCdate
11010 *FX15
11012 PROCprompt
11020 COLOUR128:COLOUR1
11030 PROCbox
11040 date$=FNtype(20,1,38,1)
11042 PROCunprompt
11050 PROCbox
11060 ENDPROC
11999
12000 DEFPROCprog
12002 PROCprompt
12010 PROCbox
12020 prog$=FNtype(20,12,38,3)
12022 PROCunprompt
12030 PROCbox
12040 ENDPROC
12999
13000 DEFPROCshot
13002 PROCprompt
13010 PROCbox
13020 shot$=FNtype(20,14,38,14)
13030 take%=1
13032 PROCunprompt
13040 PROCtake
13050 PROCbox
13060 ENDPROC
13999
14000 DEFPROCtake
14010 VDU23,1,0,0;0;0;0;
14020 COLOUR128:COLOUR1
14030 VDU28,20,16,38,16
14040 IFtake%<1 take%=1
14050 take$=LEFT$("TAKE: "+STR$take%+STRING$(13," "),18)
14060 PRINTTAB(0,0)take$;
14070 VDU30
14080 *FX15
14090 ENDPROC
14999
15000 DEFPROCreset
15010 PROCfinger(angle%):angle%=start_angle%:PROCtrig(angle%):PROCfinger(angle%)
15020 ENDPROC
15999
16000 DEFFNyes_no(A$)
16010 LOCAL reply$
16020 PRINT A$" (Y/N) ?";
16030 *FX15
16040 REPEAT
16050 reply$=CHR$(GET AND &DF)
16060 UNTIL reply$="Y" OR reply$="N"
16070 =(reply$="Y")
16999
17000 DEFPROCmenu
17010 A%=FNbyte(151,96,0)
17012 PROCunprompt
17014 PROCfinger(angle%)
17020 COLOUR128:COLOUR1
17030 VDU28,31,23,39,19,12
17040 VDU28,21,16,39,1
17041 VDU29,0;0;
17042 VDU24,636/xs;474/ys;1268/xs;1000/ys;
17044 GCOL0,129
17046 CLG
17050 VDU23,1,0,0;0;0;0;
17060 COLOUR128:COLOUR1
17070 PRINT"Now press:"'
17072 COLOUR129:COLOUR0
17080 PRINT"1 Reset to 10 Sec."
17090 PRINT"2 20"
17100 PRINT"3 30"
17110 PRINT"4 40"
17120 PRINT"> Increment Take"
17130 PRINT"< Decrement Take"
17140 PRINT"D Re-type DATE"
17150 PRINT"P "" PROG"
17160 PRINT"S "" SHOT"
17170 PRINT"F Auto/Manual Fade"
17171 PRINT"B Blank display"
17180 PRINT'"C Continue"
17190 PRINT"E Exit program";
17200 REPEATUNTILINSTR("1234F><SPDEC",CHR$FNinkey)>0
17202 GCOL0,128:CLG
17204 COLOUR128:COLOUR1
17206 VDU26
17210 PROCfinger(angle%)
17220 PROCbox
17230 PROCclock(angle%+1000)
17240 ENDPROC
17999
18000 DEFPROCintro
18010 VDU23,1,0,0;0;0;0;
18020 PRINT"?w``+w``+w``+w``+w``+w``+"CHR$8
18030 PRINT"5""o}0 ""o}0 ""o}0 ""o}0 ""o}0 ""o}0 ""o"CHR$8
18040 PRINT"=,,,,,,,,,,,,,,,,,,,n"CHR$8
18050 PRINT"5_~?! _~?! _~?! _~?! _~?! _~?! _~"CHR$8
18060 PRINT"}wppxwppxwppxwppxwppxwppx"CHR$8
18070 PRINT"5<,4<,4<,4l,40VTR IDENT/LEADER CLOCKj"CHR$8
18080 PRINT"57`!7+1up5zp50by Alan Pemberton (c) j"CHR$8
18090 PRINT"=,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,n"CHR$8
18100 PRINT"5All the functions of this clock arej"CHR$8
18110 PRINT"5available by pressing the j"CHR$8
18120 PRINT"5appropriate key when the clock is j"CHR$8
18130 PRINT"5at rest. Alternatively, a menu is j"CHR$8
18140 PRINT"5displayed whenESCAPEis pressed.j"CHR$8
18150 PRINT"5 j"CHR$8
18160 PRINT"5In theDATE/PROG/SHOTmodes, youj"CHR$8
18170 PRINT"5use the machine as a video type- j"CHR$8
18180 PRINT"5writer, within the chosen window. j"CHR$8
18190 PRINT"5Use the cursor, return and delete j"CHR$8
18200 PRINT"5keys as normal. To exit each box j"CHR$8
18210 PRINT"5pressSHIFT + RETURN. j"CHR$8
18220 PRINT"5 `````````````` j"CHR$8
18230 PRINT"7ssc``s`ss3s3``c```7ss3c3c`3s3```c````k"CHR$8
18240 PRINT"5-lj jp5 5 = !j 5 5 uzjf = ! j j"CHR$8
18250 PRINT"ussrsrpqpqpsqqprpppupqpqrrpqsqqpprppppz"CHR$8
18260 PRINTTAB(8);
18270 IFNOTFNyes_no("More instructions") ENDPROC
18280 VDU28,0,24,39,8,12
18290 PRINT"5When the clock is at rest, pressingj"CHR$8
18300 PRINT"51sets the clock to 10 seconds. j"CHR$8
18310 PRINT"52sets the clock to 20 seconds. j"CHR$8
18320 PRINT"53sets the clock to 30 seconds. j"CHR$8
18330 PRINT"54sets the clock to 40 seconds. j"CHR$8
18340 PRINT"5>increments the TAKE number. j"CHR$8
18350 PRINT"5<decrements the TAKE number. j"CHR$8
18360 PRINT"5Slets you type in the SHOT box. j"CHR$8
18370 PRINT"5Plets you type in the PROG box. j"CHR$8
18380 PRINT"5Dlets you type in the DATE box. j"CHR$8
18390 PRINT"5Eexits the program. j"CHR$8
18400 PRINT"5SPACEBARrestarts the countdown. j"CHR$8
18410 PRINT"5ESCAPEdisplays this menu. j"CHR$8
18420 PRINT"7ssc``s`ss3s3``ss``7ss3c3c`3s3```c````k"CHR$8
18430 PRINT"5-lj jp5 5 = !<. 5 5 uzjf = ! j j"CHR$8
18440 PRINT"ussrsrpqpqpsqqpssppupqpqrrpqsqqpprppppz"CHR$8
18450 PRINTTAB(8);
18460 IFNOTFNyes_no("More instructions") ENDPROC
18470 VDU28,0,24,39,8,12
18480 PRINT"5Seven logic lines are provided on j"CHR$8
18490 PRINT"5the User Port for the control of j"CHR$8
18500 PRINT"5external equipment. These go to j"CHR$8
18510 PRINT"5logical one as follows: j"CHR$8
18520 PRINT"5 j"CHR$8
18530 PRINT"5Bit 0While the clock is counting. j"CHR$8
18540 PRINT"5Bit 1From 30s to 20s. j"CHR$8
18550 PRINT"5Bit 2From 20s to 15s. j"CHR$8
18560 PRINT"5Bit 3From 10s to 0s. j"CHR$8
18570 PRINT"5Bit 4From 6s to 0s. j"CHR$8
18580 PRINT"5Bit 5From 5s to 0s. j"CHR$8
18590 PRINT"5Bit 6From 3s to 0s. j"CHR$8
18600 PRINT"5 j"CHR$8
18810 PRINT"7ssc``s`ss3s3``ss``7ss3c3c`3s3```c````k"CHR$8
18820 PRINT"5-lj jp5 5 = !(n 5 5 uzjf = ! j j"CHR$8
18830 PRINT"ussrsrpqpqpsqqpssppupqpqrrpqsqqpprppppz"CHR$8
18840 PRINTTAB(7)"PressSPACEBARto continue.";
18850 REPEATUNTILGET=32
18990 ENDPROC
18999
19000 DEFPROCexit
19010 *FX4
19020 A%=FNbyte(151,96,0)
19042 COLOUR129:COLOUR0
19044 VDU28,31,20,39,19,12
19046 VDU28,31,23,39,19
19050 IF FNyes_no("Exit prog") VDU22,7:OSCLILEFT$("QUIT",os%=32):END
19052 COLOUR128:CLS:COLOUR129
19060 PRINT"SPACEBAR"'"to start"''" ESCAPE "'"for menu";
19070 COLOUR128:COLOUR1
19080 ENDPROC
19999
20000 DEFPROCcentre
20010 VDU29,504/xs;544/ys;
20020 ENDPROC
20999
21000 DEFFNsin(angle%)=sin(((angle%+360)MOD360)DIV6)
21999
22000 DEFFNcos(angle%)=cos(((angle%+360)MOD360)DIV6)
22999
23000 DEFFNinkey
23010 LOCALinkey%
23020 inkey%=INKEY(0)
23030 IF inkey%>63 inkey%=inkey%AND&DF ELSEinkey%=inkey%OR16
23031 IF inkey%<>-1 AND inkey%<>66 VDU 20
23040 IF inkey%>47 AND inkey%<53 PROCfinger(angle%)
23050 IF inkey%=48 time=TIME:PROCfinger(angle%):IFangle%=150 PROCflash
23052 IF inkey%=48 PROCset_bit(0)
23060 IF inkey%=49 angle%=150:PROCtrig(angle%):PROCfinger(angle%)
23070 IF inkey%=50 angle%=210:PROCtrig(angle%):PROCfinger(angle%)
23080 IF inkey%=51 angle%=270:PROCtrig(angle%):PROCfinger(angle%)
23090 IF inkey%=52 angle%=330:PROCtrig(angle%):PROCfinger(angle%)
23092 IF inkey%>48 AND inkey%<53 start_angle%=angle%
23100 IF inkey%=70 fade%=NOTfade%:PROCauto(fade%)
23110 IF inkey%=62 take%=take%+1:PROCtake:PROCreset
23120 IF inkey%=60 take%=take%-1:PROCtake:PROCreset
23130 IF inkey%=83 PROCreset:PROCshot
23140 IF inkey%=80 PROCreset:PROCprog
23150 IF inkey%=68 PROCreset:PROCdate
23160 IF inkey%=69 PROCexit
23162 IF inkey%=66 VDU 19,1,0,0,0,0
23170 =inkey%
23999
24000 DEFPROCauto(fade%)
24010 VDU28,0,31,39,0
24020 IFfade% PRINTTAB(2,0)"AUTO-" ELSEPRINTTAB(2,0)SPC5
24030 ENDPROC
24999
25000 DEFFNtype(left%,bottom%,right%,top%)
25010 LOCAL A%,C%,typed$
25020 VDU23,1,1,0;0;0;0;
25030 VDU28,0,31,39,0
25040 VDU31,left%+6,top%
25050 *FX4,1
25060 REPEAT
25070 C%=GET:IF C%=8:C%=127
25080 IFC%=13 VDU31,left%,VPOS+1
25090 IFC%=136 VDU8
25100 IFC%=137 VDU9
25110 IFC%=138 VDU10
25120 IFC%=139 VDU11
25130 IFPOS<left% VDU31,right%,VPOS-1
25140 IFVPOS<top% VDU31,POS,bottom%
25150 IFC%=127 ANDPOS=left% VDU31,right%,VPOS-1,9
25160 IFC%>31 ANDC%<128 VDUC%
25170 IFPOS>right% VDU31,left%,VPOS+1
25180 IFVPOS>bottom% VDU31,POS,top%
25190 IF POS<left%+6 ANDVPOS=top% VDU31,left%+6,top%
25200 UNTILINKEY-1ANDINKEY-74
25210 VDU28,left%,bottom%+1,right%,top%,30
25220 typed$=""
25230 REPEAT
25250 typed$=typed$+CHR$FNbyte(135,0,0)
25260 VDU9
25270 UNTILPOS=0ANDVPOS=bottom%-top%+1
25280 VDU28,0,31,39,0
25290 VDU23,1,0,0;0;0;0;
25300 =typed$
25310 DEFPROClogic_control(angle%)
25320 IFangle%>270 PROCbyte("X000000X"):ENDPROC
25330 IFangle%<=270 ANDangle%>210 PROCbyte("X000001X"):ENDPROC
25340 IFangle%<=210 ANDangle%>180PROCbyte("X000010X"):ENDPROC
25350 IFangle%<=90 PROCbyte("X0000000"):ENDPROC
25360 IFangle%<=108 PROCbyte("X111100X"):ENDPROC
25370 IFangle%<=120 PROCbyte("X011100X"):ENDPROC
25380 IFangle%<=126 PROCbyte("X001100X"):ENDPROC
25390 IFangle%<=150 PROCbyte("X000100X"):ENDPROC
25400 IFangle%<=180 PROCbyte("X000000X")
25410 ENDPROC
25999
26000 DEFPROCset_bit(power%)
26010 LOCAL Y%
26030 control_byte%=control_byte%OR(2^power%)
26040 Y%=control_byte%
26050 A%=FNbyte(151,96,Y%)
26060 ENDPROC
26999
27000 DEFPROCclear_bit(power%)
27010 LOCAL Y%
27030 control_byte%=control_byte%AND(&FF-(2^power%))
27040 Y%=control_byte%
27050 A%=FNbyte(151,96,Y%)
27060 ENDPROC
27999
28000 DEFPROCbyte(bit$)
28010 LOCAL I%,I$
28020 FORI%=1TOLENbit$
28030 I$=MID$(bit$,I%,1)
28040 IFI$="1" PROCset_bit(LENbit$-I%)
28050 IFI$="0" PROCclear_bit(LENbit$-I%)
28060 NEXT
28070 ENDPROC
28999
29000 DEFPROCtone(angle%)
29010 IFangle%=120 ORangle%=114 SOUND1,-10,100,2
29020 IFangle%=108 SOUND1,-15,100,10
29030 IFangle%=102 ORangle%=96 SOUND1,-10,150,2
29040 IFangle%=90 SOUND1,-15,150,10
29050 ENDPROC
29999
31000 DEFPROCtrig(angle%)
31010 sin(((angle%+360)MOD360)DIV6)=SINRAD(angle%)
31012 sin(((angle%+354)MOD360)DIV6)=SINRAD(angle%-6)
31020 cos(((angle%+360)MOD360)DIV6)=1.084*COSRAD(angle%)
31022 cos(((angle%+354)MOD360)DIV6)=1.084*COSRAD(angle%-6)
31190 ENDPROC
31199
31200 DEFPROCprompt
31202 COLOUR128:COLOUR1
31204 VDU28,31,23,39,19,12
31210 VDU28,31,23,38,19
31212 COLOUR129:COLOUR0:CLS
31220 PRINT"Press"'"SHIFT+"'"RETURN"'"to leavebox.";
31230 COLOUR128:COLOUR1
31290 ENDPROC
31299
31300 DEFPROCunprompt
31310 COLOUR128:COLOUR1
31320 VDU28,31,23,38,19,12
31390 ENDPROC
31399
31400 DEFPROCflash
31410 *FX19
31420 VDU19,0,7;0;19,1,0;0;
31430 *FX19
31440 VDU19,0,0;0;19,1,7;0;
31490 ENDPROC
31499
31600 DEFPROCfade
31610 LOCAL colour%,colour$,C%
31612 colour$="73625140"
31620 FORC%=1TOLENcolour$
31630 colour%=VALMID$(colour$,C%,1)
31640 *FX19
31650 VDU19,1,colour%;0;
31652 *FX19
31660 NEXT
31690 ENDPROC
31699
31990 ENDPROC
31999
32000 IFERR=17PROCmenu
32010 ONERROROFF
32020 MODE7
32030 VDU3
32040 *FX4
32050 A%=FNbyte(151,96,0)
32060 IFERR=17:OSCLILEFT$("QUIT",os%=32):END
32070 VDU31,0,10
32080 REPORT:PRINT"at line";ERL
32190 END
32200 DEFFNbyte(A%,X%,Y%)
32210 IFos%=6:SYS "XOS_Byte",A%,X%,Y% TO ,X%:=X%
32220 =((USR&FFF4)AND&FF00)DIV256
32300 DEFPROCdisp
32310 xs=1:ys=1:IF os%<>32:ENDPROC
32320 SYS "GetSystemMetrics", 0 TO xscreen%
32330 SYS "GetSystemMetrics", 1 TO yscreen%
32340 SYS "SetWindowLong", @hwnd%, -16, &16000000
32350 SYS "SetWindowPos", @hwnd%, -1, 0, 0, xscreen%, yscreen%, 0
32360 VDU 26,23,22,xscreen%;yscreen%;xscreen%DIV40,yscreen%DIV32,2,0
32370 xs=1280/xscreen%/2:ys=1024/yscreen%/2
32380 ENDPROC