--- title: "Big Digit Clock" id: 72817 type: "computer_media" slug: "big-digit-clock" url: "http://localhost/computer_media/big-digit-clock/" markdown_url: "http://localhost/computer_media/big-digit-clock.md" published_at: "2026-10-27T14:27:22+00:00" modified_at: "2026-10-27T14:27:22+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/k-1.png" excerpt: "Sets the TS2068's frame counter to the time you give and shows the hours and minutes as four large digits drawn from the ROM character set." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" genre: - name: "Clock" slug: "clock" taxonomy: "genre" url: "http://localhost/type/clock/" media_type: "Program" download_url: "https://archive.org/download/timex-sinclair-software-archive/Big%20Digit%20Clock%20%28198x%29%28-%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "Big Digit Clock (198x)(-)(TS2068)(US)(Program)/Big Digit Clock (198x)(-)(TS2068)(US)(Program).tap" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2026/10/k-1.png" related_content: - id: 70950 title: "Talk Clock" type: "computer_media" url: "http://localhost/computer_media/talkclock/" - id: 54984 title: "Large Characters" type: "computer_media" url: "http://localhost/computer_media/large-characters/" media_type_tags: "Clock" license: false --- # Big Digit Clock Clock asks for the hour and minute, sets the computer’s frame counter to match, and then shows the time as four large digits filling the middle of the screen. Each digit is drawn 8 × 8 character cells, one cell for each pixel of the ordinary ROM character, so the display can be read across a room. ## Program Analysis Lines 30–70 convert the time to frames (×60 per second on the TS2068) and poke the three bytes of the FRAMES system variable at 23672–23674. The main loop (100–190) reads FRAMES back, works out hours, minutes and seconds, and builds a four-character string `t$`. The drawing routine at 200 finds each digit’s bitmap through the CHARS system variable (23606), takes the eight rows, splits each byte into bits with repeated division by 2, and prints CHR$ 144 or CHR$ 143 for each bit. Line 203 defines user-defined graphic A as a blank cell from the DATA at line 300. ### Notable Techniques - The FRAMES counter used as a real-time clock. - Large characters drawn from the ROM font, with CHR$ (144-BIT) choosing between a blank graphic and a solid block. ### Potential Issues - The display is redrawn only when the seconds reach 47 (line 180), so the time first appears up to a minute after it is set and then changes once a minute. - Hour 13 becomes 1, but hour 0 is shown as 00, and the clock does not wrap after 24 hours. This copy came from a Larken disk; only the disk save and menu lines were removed. Tested in ZEsarUX. ## Source Code ``` 1 BORDER 7: PAPER 7: INK 0: CLS 5 DIM t$(4) 10 INPUT "Hour ? ";h 20 INPUT "Minute ? ";m 30 LET a=(h*3600+m*60)*60 40 LET b=INT (a/65536): POKE 23674,b 50 LET c=a-b*65536 60 LET a=INT (c/256): POKE 23673,a 70 LET b=c-a*256: POKE 23672,b 100 LET t=INT ((65536*PEEK 23674+256*PEEK 23673+PEEK 23672)/60) 110 LET h=INT (t/3600) 120 LET b=t-h*3600 130 LET m=INT (b/60) 140 LET s=b-m*60: IF h=13 THEN LET h=1 150 LET t$( TO 2)=STR$ h: IF LEN STR$ h=1 THEN LET t$( TO 2)="0"+STR$ h 160 LET t$(3 TO 4)=STR$ m: IF LEN STR$ m=1 THEN LET t$(3 TO 4)="0"+STR$ m 180 IF s=47 THEN GO SUB 200 190 GO TO 100 200 FOR Z=1 TO 4 203 RESTORE : FOR J=0 TO 7: READ a: POKE USR CHR$ 144+J,a: NEXT J 205 LET J=CODE t$(Z)-33 210 LET C=PEEK 23606+256*PEEK 23607+256 220 FOR P=7 TO 14 225 LET BYTE=PEEK (C+P+J*8) 235 FOR L=Z*8-1 TO (Z-1)*8 STEP -1 240 LET X=INT (BYTE/2): LET BIT=BYTE-2*X: LET BYTE=X 245 PRINT AT P,L;CHR$ (144-BIT) 250 NEXT L 255 NEXT P 260 NEXT Z 270 RETURN 300 DATA 0,0,0,0,0,0,0,0 9000 SAVE "CLOCK" LINE 0 9992 REM removed (LKDOS-only) 9998 REM removed (LKDOS-only) ```