10 REM ************************ 20 REM Analogue Clock 30 REM From Notebook Manual 40 REM Developed by Tim Surtell 50 REM ************************ 60 REM NC200 Version 3.1 70 REM Downloaded from Tim's NC Users' Site 80 REM http://www.ncus.org.uk 90 REM Features smooth display, date, and chimes! 100 DIMsn%(60),cs%(60),snoff%(60),csoff%(60),gong%(45),last%(3) 110 end=0 120 FORI=1 TO 45:READgong%(I):NEXT 130 CLG 140 FORI=10 TO 480 STEP 20:MOVE0,120:MOVEI,0:PLOT85,I+10,0:NEXT 150 FORtheta=0 TO 59:MOVE240,63:PLOT87,INT(60*SIN(RAD(theta*6)))*1.12+240,INT(60*COS(RAD(theta*6)))*1.12+63:NEXT 160 FORtheta=0 TO 59 170 sn%(theta)=INT(60*SIN(RAD(theta*6))) 180 snoff%(theta)=sn%(theta)+240 190 cs%(theta)=INT(60*COS(RAD(theta*6))) 200 csoff%(theta)=cs%(theta)+63 210 PLOT69,snoff%(theta),csoff%(theta) 220 IF (theta MOD 5)=0 PROC_Draw_Hour_Blob(theta) 230 NEXT 240 MOVE350,65:DRAW460,65:DRAW460,102:DRAW350,102:DRAW350,65 250 hour$=MID$(TIME$,17,2) 260 min$=MID$(TIME$,20,2) 270 sec$=MID$(TIME$,23,2) 280 PRINTTAB(60,4)LEFT$(TIME$,15)TAB(63,6);MID$(TIME$,17,8) 290 hour=VAL(hour$):min=VAL(min$):sec=VAL(sec$) 300 IF hour>12 hour=hour-12 310 IF hour=12 hour=hour-12 320 hour=INT(hour) 330 PROC_Draw_Hand(sec,0.9,3) 340 PROC_Draw_Hand(min,0.8,2) 350 PROC_Draw_Hand(hour*5+(min/12),0.4,1) 360 IF end>0 PROC_Gong 370 IF min=15 AND sec=0 AND end=0 n%=1:end=5 380 IF min=30 AND sec=0 AND end=0 n%=1:end=10 390 IF min=45 AND sec=0 AND end=0 n%=1:end=15 400 IF min=0 AND sec=0 AND hour>0 AND end=0 n%=1:end=(hour*2)+21 410 IF min=0 AND sec=0 AND hour=0 AND end=0 n%=1:end=45 420 GOTO250 430 DEF PROC_Draw_Hand(time,length,l) 440 MOVE240,63 450 PLOT7,sn%(last%(l))*length+240,cs%(last%(l))*length+63 460 MOVE240,63 470 DRAWsn%(time)*length+240,cs%(time)*length+63 480 last%(l)=time 490 ENDPROC 500 DEF PROC_Draw_Hour_Blob(angle) 510 MOVEsnoff%(angle),csoff%(angle) 520 DRAWsn%(angle)*1.1+240,cs%(angle)*1.1+63 530 ENDPROC 540 DEF PROC_Gong 550 SOUND1,0,gong%(n%),-1 560 TIME=0:REPEAT:UNTILTIME=90 570 n%=n%+1 580 IF n%=end+1 end=0:SOUND1,0,0,0 590 ENDPROC 600 DATA164,148,156,128,0,128,156,164,148,0 610 DATA164,156,148,128,0,128,156,164,148,0,0 620 DATA100,0,100,0,100,0,100,0,100,0,100,0,100,0,100,0,100,0,100,0,100,0,100,0