REM IF YOU'RE DUTCH, READ THIS: REM ********************************************** REM Meer QBASIC software is te vinden op: REM http://www.euronet.nl/users/rkohm/ REM Heb je vragen, e-mail dan naar: REM rkohm@euronet.nl REM ********************************************** ' A clock, made by Robin Ohm. 15-6-1996. If you have a question, ' please send an e-mail to rkohm@euronet.nl SCREEN 12 'draws the clock. CIRCLE (320, 240), 200, 15 CIRCLE (320, 440), 10, 15: DRAW "bup15,15bd5p15,15" CIRCLE (320, 40), 10, 15: DRAW "bup15,15bd5p15,15" CIRCLE (120, 240), 10, 15: DRAW "blp15,15br5p15,15" CIRCLE (520, 240), 10, 15: DRAW "blp15,15br5p15,15" DRAW "bm320,240TA30bu200": CIRCLE STEP(0, 0), 7, 15: DRAW "bu3p15,15bd6p15,15" DRAW "bm320,240TA60bu200": CIRCLE STEP(0, 0), 7, 15: DRAW "bu3p15,15bd6p15,15" DRAW "bm320,240TA120bu200": CIRCLE STEP(0, 0), 7, 15: DRAW "bu3p15,15bd6p15,15" DRAW "bm320,240TA150bu200": CIRCLE STEP(0, 0), 7, 15: DRAW "bu3p15,15bd6p15,15" DRAW "bm320,240TA210bu200": CIRCLE STEP(0, 0), 7, 15: DRAW "bu3p15,15bd6p15,15" DRAW "bm320,240TA240bu200": CIRCLE STEP(0, 0), 7, 15: DRAW "bu3p15,15bd6p15,15" DRAW "bm320,240TA300bu200": CIRCLE STEP(0, 0), 7, 15: DRAW "bu3p15,15bd6p15,15" DRAW "bm320,240TA330bu200": CIRCLE STEP(0, 0), 7, 15: DRAW "bu3p15,15bd6p15,15" CIRCLE (320, 240), 10: PAINT (320, 240), 15 PAINT (1, 1), 1, 15: PAINT (300, 240), 8, 15 DO DO ' loop until the time changes thetime$ = TIME$ hours = VAL(MID$(thetime$, 1, 2)) min = VAL(MID$(thetime$, 4, 2)) sec = VAL(MID$(thetime$, 7, 2)) LOOP UNTIL sec <> secold PLAY "l30 c" DRAW "TA-" + STR$(secold * 6) + "c8bm320,240d40u230" ' redraw the hands in IF min <> minold THEN ' the background color. DRAW "TA-" + STR$(minold * 6) + "c8bm320,240d40u180h10e10u30d30f10g10" hourstmp = hoursold IF hoursold >= 12 THEN hourstmp = hoursold - 12 DRAW "TA-" + STR$(CINT(30 * hourstmp + minold / 2)) + "c8bm320,240d40u150h10e10u20d20f10g10" END IF DRAW "TA-" + STR$(sec * 6) + "c4bm320,240d40u230" ' draw the hands DRAW "TA-" + STR$(min * 6) + "c14bm320,240d40u180h10e10u30d30f10g10" hourstmp = hours IF hours >= 12 THEN hourstmp = hours - 12 DRAW "TA-" + STR$(CINT(30 * hourstmp + min / 2)) + "c14bm320,240d40u150h10e10u20d20f10g10" CIRCLE (320, 240), 10, 15: PAINT (320, 240), 15 hoursold = hours ' you need these variables to redraw the hands in minold = min ' the background color. secold = sec LOOP UNTIL INKEY$ <> "" ' loop until the user presses a key.