commit e8480dc66973f34320acbfdd486744b376925c3b
parent 0dc6515e086b3a22a2ae3b9b909eb18a12efbc84
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Fri, 19 Nov 2021 12:03:27 -0500
(clock.tal) Optimizations
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/projects/examples/devices/datetime.tal b/projects/examples/devices/datetime.tal
@@ -162,16 +162,16 @@ RTN
#03 .Screen/sprite DEO
,&reset JSR
RTN
+ &digit ( number -- )
+ 10* TOS ;font ++ .Screen/addr DEO2
+ #03 .Screen/sprite DEO
+ ,&pady JSR
+ #03 .Screen/sprite DEO
+ RTN
&number ( number -- )
- DUP #0a DIV [ 10* TOS ;font ++ ] .Screen/addr DEO2
- #03 .Screen/sprite DEO
- ,&pady JSR
- #03 .Screen/sprite DEO
+ DUP #0a DIV ,&digit JSR
,&reset JSR
- #0a MOD [ 10* TOS ;font ++ ] .Screen/addr DEO2
- #03 .Screen/sprite DEO
- ,&pady JSR
- #03 .Screen/sprite DEO
+ #0a MOD ,&digit JSR
&reset
.Screen/x DEI2 #0008 ++ .Screen/x DEO2
.Screen/y DEI2 #0008 -- .Screen/y DEO2