commit 26040d19cb7c3e90e4ae447816473a5d5c709e76
parent dd6adb3f739c8ab0decfcaf01c00ca67ff54387e
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Tue, 16 Nov 2021 14:35:08 -0500
(clock.tal) Higher font for digits
Diffstat:
1 file changed, 53 insertions(+), 47 deletions(-)
diff --git a/projects/examples/devices/datetime.tal b/projects/examples/devices/datetime.tal
@@ -6,6 +6,7 @@
%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 }
%8* { #30 SFT }
+%10* { #40 SFT }
%2// { #01 SFT2 }
%4// { #02 SFT2 }
%2** { #10 SFT2 }
@@ -22,7 +23,6 @@
%12HOURS { #0c MOD }
%LTS2 { #8000 ++ SWP2 #8000 ++ GTH2 }
%GTS2 { #8000 ++ SWP2 #8000 ++ LTH2 }
-%GET-CHAR-SPRITE { 8* TOS ;font-hex ++ }
( devices )
@@ -114,49 +114,51 @@ RTN
@draw-display ( -- )
- ( auto x ) #01 .Screen/auto DEO
-
+ ( auto addr ) #04 .Screen/auto DEO
( date )
.center/y LDZ2 #0068 -- .Screen/y DEO2
.center/x LDZ2 #0014 -- .Screen/x DEO2
- .DateTime/month DEI INC
- DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2
- #03 .Screen/sprite DEO
- #0a MOD GET-CHAR-SPRITE .Screen/addr DEO2
- #03 .Screen/sprite DEO
- .Screen/x DEI2 #0008 ++ .Screen/x DEO2
- .DateTime/day DEI
- DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2
- #03 .Screen/sprite DEO
- #0a MOD GET-CHAR-SPRITE .Screen/addr DEO2
- #03 .Screen/sprite DEO
-
+ .DateTime/month DEI2
+ SWP INC ,&number JSR
+ ;font/slash ,&spacer JSR
+ ,&number JSR
( time )
.center/y LDZ2 #0060 ++ .Screen/y DEO2
.center/x LDZ2 #0020 -- .Screen/x DEO2
- .DateTime/hour DEI
- DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2
- #01 .Screen/sprite DEO
- #0a MOD GET-CHAR-SPRITE .Screen/addr DEO2
- #01 .Screen/sprite DEO
- ;spacer-icn .Screen/addr DEO2
- .DateTime/second DEI #01 AND .Screen/sprite DEO
- .DateTime/minute DEI
- DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2
- #01 .Screen/sprite DEO
- #0a MOD GET-CHAR-SPRITE .Screen/addr DEO2
- #01 .Screen/sprite DEO
- ;spacer-icn .Screen/addr DEO2
- .DateTime/second DEI #01 AND .Screen/sprite DEO
- .DateTime/second DEI
- DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2
- #01 .Screen/sprite DEO
- #0a MOD GET-CHAR-SPRITE .Screen/addr DEO2
- #01 .Screen/sprite DEO
-
+ .DateTime/hour DEI2
+ SWP ,&number JSR
+ ;font/spacer ,&spacer JSR
+ ,&number JSR
+ ;font/spacer ,&spacer JSR
+ .DateTime/second DEI
+ ,&number JSR
( auto none ) #00 .Screen/auto DEO
+
RTN
+ &pady ( -- )
+ .Screen/y DEI2 #0008 ++ .Screen/y DEO2 RTN
+ &spacer ( char* -- )
+ .Screen/addr DEO2
+ #03 .Screen/sprite DEO
+ ,&pady JSR
+ #03 .Screen/sprite DEO
+ ,&reset JSR
+ RTN
+ &number ( number -- )
+ DUP #0a DIV [ 10* TOS ;font ++ ] .Screen/addr DEO2
+ #03 .Screen/sprite DEO
+ ,&pady JSR
+ #03 .Screen/sprite DEO
+ ,&reset JSR
+ #0a MOD [ 10* TOS ;font ++ ] .Screen/addr DEO2
+ #03 .Screen/sprite DEO
+ ,&pady JSR
+ #03 .Screen/sprite DEO
+ &reset
+ .Screen/x DEI2 #0008 ++ .Screen/x DEO2
+ .Screen/y DEI2 #0008 -- .Screen/y DEO2
+ RTN
@draw-line ( x1 y1 x2 y2 color -- )
@@ -196,15 +198,19 @@ RTN
0658 0b4b 113f 1834 202a 2a20 3418 3f11
4b0b 5806 6502 7200
-@spacer-icn
- 0000 0010 0010 0000
-
-@font-hex ( 0-F )
- 007c 8282 8282 827c 0030 1010 1010 1010
- 007c 8202 7c80 80fe 007c 8202 1c02 827c
- 000c 1424 4484 fe04 00fe 8080 7c02 827c
- 007c 8280 fc82 827c 007c 8202 1e02 0202
- 007c 8282 7c82 827c 007c 8282 7e02 827c
- 007c 8202 7e82 827e 00fc 8282 fc82 82fc
- 007c 8280 8080 827c 00fc 8282 8282 82fc
- 007c 8280 f080 827c 007c 8280 f080 8080
+@font
+ 0018 2442 4242 4242 4242 4242 4224 1800
+ 0008 1828 0808 0808 0808 0808 0808 1c00
+ 0018 2442 4202 0202 0408 1020 4040 7e00
+ 0018 2442 0202 0438 0402 0202 0204 7800
+ 000c 0c14 1414 2424 2444 447e 0404 0e00
+ 007e 4040 4040 5864 4202 0202 0204 7800
+ 000c 1020 4040 5864 4242 4242 4224 1800
+ 007e 4202 0204 0404 0808 0810 1010 1000
+ 0018 2442 4242 2418 2442 4242 4224 1800
+ 0018 2442 4242 4242 261a 0202 0408 3000
+ &spacer
+ 0000 0000 0010 1000 0000 0000 1010 0000
+ &slash
+ 0202 0404 0808 1010 2020 4040 8080 0000
+