10 REM ************************ 20 REM Analogue Clock 30 REM From Notebook Manual 40 REM Developed by Tim Surtell 50 REM ************************ 60 REM NC100 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 VDU29,0;63; 120 end=0 130 FORI=1 TO 45:READgong%(I):NEXT 140 CLG 150 FORtheta=0 TO 59 160 sn%(theta)=INT(30*SIN(RAD(theta*6))) 170 snoff%(theta)=sn%(theta)+240 180 cs%(theta)=INT(30*COS(RAD(theta*6))) 190 csoff%(theta)=cs%(theta)+32 200 PLOT69,snoff%(theta),csoff%(theta) 210 IF (theta MOD 5)=0 PROC_Draw_Hour_Blob(theta) 220 NEXT 230 MOVE350,6:DRAW460,6:DRAW460,37:DRAW350,37:DRAW350,6 240 hour$=MID$(TIME$,17,2) 250 min$=MID$(TIME$,20,2) 260 sec$=MID$(TIME$,23,2) 270 PRINTTAB(60,4)LEFT$(TIME$,15)TAB(63,6);MID$(TIME$,17,8) 280 hour=VAL(hour$):min=VAL(min$):sec=VAL(sec$) 290 IF hour>12 hour=hour-12 300 IF hour=12 hour=hour-12 310 hour=INT(hour) 320 PROC_Draw_Hand(sec,0.9,3) 330 PROC_Draw_Hand(min,0.8,2) 340 PROC_Draw_Hand(hour*5+(min/12),0.4,1) 350 IF end>0 PROC_Gong 360 IF min=15 AND sec=0 AND end=0 n%=1:end=5 370 IF min=30 AND sec=0 AND end=0 n%=1:end=10 380 IF min=45 AND sec=0 AND end=0 n%=1:end=15 390 IF min=0 AND sec=0 AND hour>0 AND end=0 n%=1:end=(hour*2)+21 400 IF min=0 AND sec=0 AND hour=0 AND end=0 n%=1:end=45 410 GOTO240 420 DEF PROC_Draw_Hand(time,length,l) 430 MOVE240,32 440 PLOT7,sn%(last%(l))*length+240,cs%(last%(l))*length+32 450 MOVE240,32 460 DRAWsn%(time)*length+240,cs%(time)*length+32 470 last%(l)=time 480 ENDPROC 490 DEF PROC_Draw_Hour_Blob(angle) 500 MOVEsnoff%(angle),csoff%(angle) 510 DRAWsn%(angle)*1.1+240,cs%(angle)*1.1+32 520 ENDPROC 530 DEF PROC_Gong 540 SOUND1,0,gong%(n%),-1 550 TIME=0:REPEAT:UNTILTIME=90 560 n%=n%+1 570 IF n%=end+1 end=0:SOUND1,0,0,0 580 ENDPROC 590 DATA164,148,156,128,0,128,156,164,148,0 600 DATA164,156,148,128,0,128,156,164,148,0,0 610 DATA100,0,100,0,100,0,100,0,100,0,100,0,100,0,100,0,100,0,100,0,100,0,100,0