Browse code

(clock.tal) Higher font for digits

Devine Lu Linvega authored on 16/11/2021 19:35:08
Showing 1 changed files
... ...
@@ -6,6 +6,7 @@
6 6
 %<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 } 
7 7
 
8 8
 %8* { #30 SFT }
9
+%10* { #40 SFT }
9 10
 %2// { #01 SFT2 }
10 11
 %4// { #02 SFT2 }
11 12
 %2** { #10 SFT2 }
... ...
@@ -22,7 +23,6 @@
22 23
 %12HOURS { #0c MOD }
23 24
 %LTS2    { #8000 ++ SWP2 #8000 ++ GTH2 }
24 25
 %GTS2    { #8000 ++ SWP2 #8000 ++ LTH2 }
25
-%GET-CHAR-SPRITE { 8* TOS ;font-hex ++ }
26 26
 
27 27
 ( devices )
28 28
 
... ...
@@ -114,49 +114,51 @@ RTN
114 114
 
115 115
 @draw-display ( -- )
116 116
 
117
-	( auto x ) #01 .Screen/auto DEO
118
-
117
+	( auto addr ) #04 .Screen/auto DEO
119 118
 	( date )
120 119
 	.center/y LDZ2 #0068 -- .Screen/y DEO2
121 120
 	.center/x LDZ2 #0014 -- .Screen/x DEO2
122
-		.DateTime/month DEI INC
123
-		DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2
124
-			#03 .Screen/sprite DEO
125
-			#0a MOD GET-CHAR-SPRITE .Screen/addr DEO2
126
-			#03 .Screen/sprite DEO
127
-	.Screen/x DEI2 #0008 ++ .Screen/x DEO2
128
-		.DateTime/day DEI
129
-		DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2
130
-			#03 .Screen/sprite DEO
131
-			#0a MOD GET-CHAR-SPRITE .Screen/addr DEO2
132
-			#03 .Screen/sprite DEO
133
-
121
+	.DateTime/month DEI2 
122
+		SWP INC ,&number JSR
123
+		;font/slash ,&spacer JSR
124
+		,&number JSR
134 125
 	( time )
135 126
 	.center/y LDZ2 #0060 ++ .Screen/y DEO2
136 127
 	.center/x LDZ2 #0020 -- .Screen/x DEO2
137
-		.DateTime/hour DEI
138
-		DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2
139
-			#01 .Screen/sprite DEO
140
-			#0a MOD GET-CHAR-SPRITE .Screen/addr DEO2
141
-			#01 .Screen/sprite DEO
142
-	;spacer-icn .Screen/addr DEO2
143
-	.DateTime/second DEI #01 AND .Screen/sprite DEO
144
-		.DateTime/minute DEI
145
-		DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2
146
-			#01 .Screen/sprite DEO
147
-			#0a MOD GET-CHAR-SPRITE .Screen/addr DEO2
148
-			#01 .Screen/sprite DEO
149
-	;spacer-icn .Screen/addr DEO2
150
-	.DateTime/second DEI #01 AND .Screen/sprite DEO
151
-		.DateTime/second DEI 
152
-		DUP #0a DIV GET-CHAR-SPRITE .Screen/addr DEO2
153
-			#01 .Screen/sprite DEO
154
-			#0a MOD GET-CHAR-SPRITE .Screen/addr DEO2
155
-			#01 .Screen/sprite DEO
156
-
128
+	.DateTime/hour DEI2 
129
+		SWP ,&number JSR
130
+		;font/spacer ,&spacer JSR
131
+		,&number JSR
132
+		;font/spacer ,&spacer JSR
133
+	.DateTime/second DEI 
134
+		,&number JSR
157 135
 	( auto none ) #00 .Screen/auto DEO
158 136
 
137
+
159 138
 RTN
139
+	&pady ( -- )
140
+		.Screen/y DEI2 #0008 ++ .Screen/y DEO2 RTN
141
+	&spacer ( char* -- )
142
+		.Screen/addr DEO2
143
+		#03 .Screen/sprite DEO
144
+		,&pady JSR
145
+		#03 .Screen/sprite DEO
146
+		,&reset JSR
147
+		RTN
148
+	&number ( number -- )
149
+		DUP #0a DIV [ 10* TOS ;font ++ ] .Screen/addr DEO2
150
+			#03 .Screen/sprite DEO
151
+			,&pady JSR
152
+			#03 .Screen/sprite DEO
153
+			,&reset JSR
154
+			#0a MOD [ 10* TOS ;font ++ ] .Screen/addr DEO2
155
+			#03 .Screen/sprite DEO
156
+			,&pady JSR
157
+			#03 .Screen/sprite DEO
158
+	&reset
159
+		.Screen/x DEI2 #0008 ++ .Screen/x DEO2
160
+		.Screen/y DEI2 #0008 -- .Screen/y DEO2
161
+	RTN
160 162
 
161 163
 @draw-line ( x1 y1 x2 y2 color -- )
162 164
 	
... ...
@@ -196,15 +198,19 @@ RTN
196 198
 	0658 0b4b 113f 1834 202a 2a20 3418 3f11
197 199
 	4b0b 5806 6502 7200
198 200
 
199
-@spacer-icn
200
-	0000 0010 0010 0000
201
-
202
-@font-hex ( 0-F )
203
-	007c 8282 8282 827c 0030 1010 1010 1010
204
-	007c 8202 7c80 80fe 007c 8202 1c02 827c
205
-	000c 1424 4484 fe04 00fe 8080 7c02 827c
206
-	007c 8280 fc82 827c 007c 8202 1e02 0202
207
-	007c 8282 7c82 827c 007c 8282 7e02 827c
208
-	007c 8202 7e82 827e 00fc 8282 fc82 82fc
209
-	007c 8280 8080 827c 00fc 8282 8282 82fc
210
-	007c 8280 f080 827c 007c 8280 f080 8080
201
+@font
202
+	0018 2442 4242 4242 4242 4242 4224 1800
203
+	0008 1828 0808 0808 0808 0808 0808 1c00
204
+	0018 2442 4202 0202 0408 1020 4040 7e00
205
+	0018 2442 0202 0438 0402 0202 0204 7800
206
+	000c 0c14 1414 2424 2444 447e 0404 0e00
207
+	007e 4040 4040 5864 4202 0202 0204 7800
208
+	000c 1020 4040 5864 4242 4242 4224 1800
209
+	007e 4202 0204 0404 0808 0810 1010 1000
210
+	0018 2442 4242 2418 2442 4242 4224 1800
211
+	0018 2442 4242 4242 261a 0202 0408 3000
212
+	&spacer
213
+	0000 0000 0010 1000 0000 0000 1010 0000
214
+	&slash
215
+	0202 0404 0808 1010 2020 4040 8080 0000
216
+