时钟
16,1:X0=160:Y0=100:pI=3.141549:HR=30:MR=40:SR=60:E=3.14159/2:LOCATE 5,1:PRINT DATE$
20 FOR P=1 TO 12
30 X1=62*COS(P/6*PI-E)+X0:Y1=62*SIN(P/6*PI-E)+Y0
40 X1=80*COS(P/6*PI-E)+X0:Y1=80*SIN(P/6*PI-E)+Y0
50 LINE (X1,Y1)-(X2,Y2),2
60 NEXT P
70 V$-TIMEE$
80 IF MID$(Va$,2,1)=":" THEN GOTO 100
90 HH$=LEFT$(F$,2):MM$=MID$(V$,4,2):SS$=RIGHT$(V$,2):GOTO 110
100 HH$=LEFT$(V$,1):MM$=MID$(V$,3,2):SS$=RIGHT$(V$,2)
110 HH$=VAL(HH$):MM=VAL(MM$):SS=VAL(SS$)
120 IF MM<>0 THEN 140
130 IF SS>1 THEN 140 ELSE BEEP
140 CIRCLE(X0,Y0),3,2:PAINT (X0,Y0),2
150 XS=SR*COS(SS/30*PI-E)+X0
160 YS=SR*SIN(SS/30*PI-E)+Y0
170 XM=MR*COS(MM/30*PI-E)+X0
180 YM=MR*SIN(MM/30*PI-E)+Y0
190 XH=HR*COS(HH/6*PI+MM/360*PI-E)+X0
200 YH=HR*SIN(HH/6*PI+M/360*PI-E)+Y0
210 LINE (X0,Y0)-(XS1,YS1),0
220 LINE (X0,Y0)-(XS,YS),1
230 LINE (X0,Y0)-(XM1,YM1),0
240 LINE (X0,Y0)-(XM,YM),1
250 LINE (X0,Y0)-(XH1,YH1),0
260 LINE (X0,Y0)-(XH,YH),1
270 XS1=XS:YS1=YS:XM1=XM:YM1=YM:XH1=XH:H1=YH
280 GOTO 70