Clock display
This code from block 1168 is loaded into node 512. It displays a 4-digit time that can be PDT, UTC or LST.
d/mod
Basic divide code with a 36-bit positive dividend; 18-bit negative divisor, 18-bit positive quotient and remainder.
/mod
- Convert an 18-bit unsigned number to a 36-bit number
- d/mod returns remainder and quotient
.min
Display hhmm:
- Separate 4 digits
- Convert to characters (1 +)
- Send to right (513)
.d
4-digit decimal display. Not used.
eol
Send end-of-line character.
go
An infinite loop:
- Display the 168 (7x24) scan-lines needed for a row of big text
- Repeat for 1 LST minute (2932 times). A UTC, PDT minute would be 2940 times (49 Hz times 60)
- Then increment minutes
This timing is not exact, but adequate for my purposes.
Big characters
The display can be done with normal characters (with more blank lines) but it's not impressive.
Code for nodes 513 and 709 can be changed to display big characters. They're defined as the usual 5x7 bit maps (without the blank slice). For 8 times larger, each slice in 513 increases from 3 to 24 scan lines and the number of blank lines becomes 600. The pixel delay in 709 is increased so the pixels are square (166 unexts).
These changes are an exercise for the reader.