https://www.reddit.com/r/retrobattlesta ... ary_clock/
and got inspired to make this analog clock:
Code: Select all
5 ?"{clear}"
6 input "hhmmss"; ti$
7 ?"{clear}"
8 poke 36879, 8
10 dim c%(60)
20 for x=0 to 7
30 read y
40 c%(x) = 7910 - (y*22) + x
50 c%(15-x) = 7910 - (x*22) + y
60 c%(15+x) = 7910 + (x*22) + y
70 c%(30-x) = 7910 + (y*22) + x
80 c%(30+x) = 7910 + (y*22) - x
90 c%(45-x) = 7910 + (x*22) - y
100 c%(45+x) = 7910 - (x*22) - y
110 c%(60-x) = 7910 - (y*22) - x
190 next x
200 for i=0 to 59
210 poke c%(i), 81
220 poke 30720+c%(i), 4
230 next i
240 for i=0 to 55 step 5
250 poke c%(i), 87
260 next i
500 data 10
510 data 10
520 data 10
530 data 10
540 data 10
550 data 9
560 data 9
570 data 8
1000 a$="000000"
1010 oh = 0
1020 om = 0
1030 os = 0
1500 if a$ = ti$ goto 1500
1600 a$ = ti$
1610 hh = val(left$(a$,2))
1620 mm = val(mid$(a$,3,2))
1630 ss = val(right$(a$,2))
1640 if hh > 12 then hh = hh-12
1700 poke 30720+c%(oh*5+int(om/12)), 4
1710 poke 30720+c%(om), 4
1720 poke 30720+c%(os), 4
1800 poke 30720+c%(hh*5+int(mm/12)), 3
1810 poke 30720+c%(mm), 1
1820 poke 30720+c%(ss), 7
1900 oh = hh
1910 om = mm
1920 os = ss
2000 goto 1500