Browse code

(dos.tal) Improved hx view

neauoire authored on 23/01/2022 18:48:26
Showing 1 changed files
... ...
@@ -61,9 +61,9 @@
61 61
 |0100 ( -> )
62 62
 
63 63
 	( theme ) 
64
-	#50f5 .System/r DEO2 
65
-	#c0f5 .System/g DEO2 
66
-	#a0f5 .System/b DEO2
64
+	#0f55 .System/r DEO2 
65
+	#0fc5 .System/g DEO2 
66
+	#0fa5 .System/b DEO2
67 67
 
68 68
 	( vectors ) 
69 69
 	;on-button .Controller/vector DEO2
... ...
@@ -205,12 +205,19 @@ RTN
205 205
 		;&error-txt #02 ;draw-str JSR2 RTN &valid
206 206
 
207 207
 	AUTO-YADDR
208
-	.Screen/x DEI2 ,&anchor STR2
209
-	;view #0014 ++ ;view
208
+	.File/success DEI2 #0000
210 209
 	&loop
211
-		LDAk #01 ;draw-byte JSR2
212
-		LIT2 &anchor $2 .Screen/x DEO2
213
-		.Screen/y DEI2k #0010 ++ ROT DEO2
210
+		DUP2 ;view ++ LDA #01 ;draw-hex JSR2
211
+		( make shorts )
212
+		DUP2 #0001 AND2 #0000 == ,&no-short JCN
213
+			.Screen/x DEI2k #0008 ++ ROT DEO2
214
+			&no-short
215
+		( make lines )
216
+		DUP2 #000f AND2 #000f !! ,&no-lines JCN
217
+			.Screen/y DEI2k #0010 ++ ROT DEO2
218
+			PAD .Screen/x DEO2
219
+			.Screen/y DEI2 .Screen/height DEI2 PAD -- #0010 -- >> ,&end JCN
220
+			&no-lines
214 221
 		INC2 GTH2k ,&loop JCN
215 222
 	&end
216 223
 	POP2 POP2
... ...
@@ -263,9 +270,9 @@ RTN
263 270
 	;commands/end ;commands
264 271
 	&loop
265 272
 		PAD .Screen/x DEO2
266
-		LDA2k #06 ;draw-str JSR2
273
+		( name ) LDA2k #08 ;draw-str JSR2
267 274
 		PAD #0020 ++ .Screen/x DEO2
268
-		DUP2 ;commands -- ;commands-docs ++ LDA2 #01 ;draw-str JSR2
275
+		( docs ) DUP2 ;commands -- ;commands-docs ++ LDA2 #01 ;draw-str JSR2
269 276
 		.Screen/y DEI2k #0010 ++ ROT DEO2
270 277
 		INC2 INC2 GTH2k ,&loop JCN
271 278
 	&end
... ...
@@ -287,6 +294,8 @@ RTN
287 294
 	:cmd-hx/func :cmd-tx/func :cmd-do/func :cmd-tm/func
288 295
 	&end :cmd-??/func
289 296
 
297
+( gui )
298
+
290 299
 @draw-input ( color -- )
291 300
 
292 301
 	AUTO-YADDR
... ...
@@ -307,20 +316,6 @@ RTN
307 316
 
308 317
 JMP2r
309 318
 
310
-@draw-byte ( byte color -- )
311
-
312
-	STH
313
-	DUP #04 SFT ,&parse JSR STHkr ;draw-char JSR2
314
-	#0f AND ,&parse JSR STHr ;draw-char JSR2
315
-	RTN
316
-	&parse ( value -- char )
317
-		DUP #09 > ,&above JCN
318
-			#30 + RTN
319
-		&above
320
-			#09 - #60 + RTN
321
-
322
-RTN
323
-
324 319
 @draw-tx ( str* color -- )
325 320
 
326 321
 	AUTO-YADDR
... ...
@@ -354,6 +349,20 @@ RTN
354 349
 
355 350
 RTN
356 351
 
352
+@draw-hex ( byte color -- )
353
+
354
+	STH
355
+	DUP #04 SFT ,&parse JSR STHkr ,draw-char JSR
356
+	#0f AND ,&parse JSR STHr ,draw-char JSR
357
+	RTN
358
+	&parse ( value -- char )
359
+		DUP #09 > ,&above JCN
360
+			#30 + RTN
361
+		&above
362
+			#09 - #60 + RTN
363
+
364
+RTN
365
+
357 366
 @draw-str ( str* color -- )
358 367
 
359 368
 	AUTO-YADDR