DECLARE SUB Display (dig$, col%) 'program to display a big clock so you can tell time from far away 'by looking at the monitor. '************************************ 'vars DIM SHARED num$(10) 'data section zero: DATA " лллл " DATA " л л " DATA "л л " DATA "л л " DATA "л л " DATA "л л " DATA "л л " DATA "л л " DATA " л л " DATA " лллл " one: DATA " л " DATA " лл " DATA " л л " DATA " л " DATA " л " DATA " л " DATA " л " DATA " л " DATA " л " DATA " ллллл " two: DATA " лл " DATA " л л " DATA "л л " DATA " л " DATA " л " DATA " л " DATA " л " DATA " лл " DATA " л " DATA "ллллллл " three: DATA " лллл " DATA "л л " DATA " л " DATA " л " DATA " ллл " DATA " л " DATA " л " DATA " л " DATA "л л " DATA " лллл " four: DATA "л л " DATA "л л " DATA "л л " DATA "л л " DATA "ллллллл " DATA " л " DATA " л " DATA " л " DATA " л " DATA " л " five: DATA "лллллл " DATA "л " DATA "л " DATA "л " DATA "лллл " DATA " л " DATA " л " DATA " л " DATA "л л " DATA " ллл " six: DATA " ллл " DATA " л л " DATA " л " DATA " л " DATA " л " DATA " лллллл " DATA " л л " DATA " л л " DATA " л л " DATA " лллл " seven: DATA " ллллл " DATA " л л " DATA " л " DATA " л " DATA " л " DATA " л " DATA " л " DATA " л " DATA " л " DATA " л " eight: DATA " лллл " DATA " л л " DATA " л л" DATA " л л " DATA " лллл " DATA " л л " DATA " л л" DATA " л л" DATA " л л " DATA " лллл " nine: DATA " лллл " DATA " л л " DATA " л л" DATA " л л" DATA " л л " DATA " ллллл " DATA " л " DATA " л " DATA " л " DATA " л " colon: DATA " " DATA " лл " DATA " лл " DATA " " DATA " " DATA " " DATA " " DATA " лл " DATA " лл " DATA " " '************************************ main: GOSUB init DO t$ = TIME$ col% = 1 FOR x = 1 TO LEN(t$) temp$ = MID$(t$, x, 1) Display temp$, col% col% = col% + 4 IF temp$ <> ":" THEN col% = col% + 5 NEXT x LOOP UNTIL INKEY$ = CHR$(27) END '************************************ init: CLS WIDTH 80, 50 COLOR 15 PRINT "Ben's Cool Computer Clock says:" PRINT " The time is:" LOCATE 42, 31 PRINT "Press ESC to quit" FOR i% = 0 TO 10 'each number FOR j% = 1 TO 10 'each line of that number READ temp$ num$(i%) = num$(i%) + temp$ NEXT j% NEXT i% RETURN '************************************ SUB Display (dig$, col%) IF dig$ <> ":" THEN dig$ = num$(VAL(dig$)) over% = 9 END IF IF dig$ = ":" THEN dig$ = num$(10) over% = 4 END IF LOCATE 15, col% FOR y% = 1 TO 10 FOR x% = 1 TO over% tot% = tot% + 1 PRINT MID$(dig$, tot%, 1); NEXT x% PRINT LOCATE , col% NEXT y% END SUB