(clock.tal) Higher font for digits

This commit is contained in:
Devine Lu Linvega 2021-11-16 14:35:08 -05:00
parent dd6adb3f73
commit 26040d19cb
1 changed files with 52 additions and 46 deletions

View File

@ -6,6 +6,7 @@
%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 } %<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 }
%8* { #30 SFT } %8* { #30 SFT }
%10* { #40 SFT }
%2// { #01 SFT2 } %2// { #01 SFT2 }
%4// { #02 SFT2 } %4// { #02 SFT2 }
%2** { #10 SFT2 } %2** { #10 SFT2 }
@ -22,7 +23,6 @@
%12HOURS { #0c MOD } %12HOURS { #0c MOD }
%LTS2 { #8000 ++ SWP2 #8000 ++ GTH2 } %LTS2 { #8000 ++ SWP2 #8000 ++ GTH2 }
%GTS2 { #8000 ++ SWP2 #8000 ++ LTH2 } %GTS2 { #8000 ++ SWP2 #8000 ++ LTH2 }
%GET-CHAR-SPRITE { 8* TOS ;font-hex ++ }
( devices ) ( devices )
@ -114,49 +114,51 @@ RTN
@draw-display ( -- ) @draw-display ( -- )
( auto x ) #01 .Screen/auto DEO ( auto addr ) #04 .Screen/auto DEO
( date ) ( date )
.center/y LDZ2 #0068 -- .Screen/y DEO2 .center/y LDZ2 #0068 -- .Screen/y DEO2
.center/x LDZ2 #0014 -- .Screen/x DEO2 .center/x LDZ2 #0014 -- .Screen/x DEO2
.DateTime/month DEI INC .DateTime/month DEI2
DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2 SWP INC ,&number JSR
#03 .Screen/sprite DEO ;font/slash ,&spacer JSR
#0a MOD GET-CHAR-SPRITE .Screen/addr DEO2 ,&number JSR
#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
( time ) ( time )
.center/y LDZ2 #0060 ++ .Screen/y DEO2 .center/y LDZ2 #0060 ++ .Screen/y DEO2
.center/x LDZ2 #0020 -- .Screen/x DEO2 .center/x LDZ2 #0020 -- .Screen/x DEO2
.DateTime/hour DEI .DateTime/hour DEI2
DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2 SWP ,&number JSR
#01 .Screen/sprite DEO ;font/spacer ,&spacer JSR
#0a MOD GET-CHAR-SPRITE .Screen/addr DEO2 ,&number JSR
#01 .Screen/sprite DEO ;font/spacer ,&spacer JSR
;spacer-icn .Screen/addr DEO2 .DateTime/second DEI
.DateTime/second DEI #01 AND .Screen/sprite DEO ,&number JSR
.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
( auto none ) #00 .Screen/auto DEO ( auto none ) #00 .Screen/auto DEO
RTN 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 -- ) @draw-line ( x1 y1 x2 y2 color -- )
@ -196,15 +198,19 @@ RTN
0658 0b4b 113f 1834 202a 2a20 3418 3f11 0658 0b4b 113f 1834 202a 2a20 3418 3f11
4b0b 5806 6502 7200 4b0b 5806 6502 7200
@spacer-icn @font
0000 0010 0010 0000 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
@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