| ... | ... |
@@ -39,6 +39,9 @@ |
| 39 | 39 |
|
| 40 | 40 |
|0000 |
| 41 | 41 |
|
| 42 |
+@date-buf $4 |
|
| 43 |
+@time-buf |
|
| 44 |
+ &h $2 &s1 $1 &m $2 &s2 $1 &s $3 |
|
| 42 | 45 |
@last |
| 43 | 46 |
&day $1 &sec $1 |
| 44 | 47 |
@center |
| ... | ... |
@@ -48,7 +51,9 @@ |
| 48 | 51 |
@time |
| 49 | 52 |
&x $2 &y $2 |
| 50 | 53 |
@needles |
| 51 |
- &hx $2 &hy $2 &mx $2 &my $2 &sx $2 &sy $2 |
|
| 54 |
+ &hx $2 &hy $2 |
|
| 55 |
+ &mx $2 &my $2 |
|
| 56 |
+ &sx $2 &sy $2 |
|
| 52 | 57 |
@line |
| 53 | 58 |
&x0 $2 &y0 $2 &x $2 &y $2 &sx $2 &sy $2 &dx $2 &dy $2 &e1 $2 &e2 $2 &color $1 |
| 54 | 59 |
|
| ... | ... |
@@ -88,6 +93,10 @@ |
| 88 | 93 |
INC GTHk ,&loop JCN |
| 89 | 94 |
POP2 |
| 90 | 95 |
|
| 96 |
+ LIT ': |
|
| 97 |
+ DUP .time-buf/s1 STZ |
|
| 98 |
+ .time-buf/s2 STZ |
|
| 99 |
+ |
|
| 91 | 100 |
BRK |
| 92 | 101 |
|
| 93 | 102 |
@on-frame ( -> ) |
| ... | ... |
@@ -95,13 +104,18 @@ BRK |
| 95 | 104 |
( once per second ) |
| 96 | 105 |
.DateTime/second DEI |
| 97 | 106 |
DUP .last/sec LDZ = ,&same-sec JCN |
| 98 |
- ( clear ) #00 ,draw-needles JSR |
|
| 99 |
- ( update ) ;make-needles JSR2 |
|
| 100 |
- ( draw ) #01 ,draw-needles JSR |
|
| 107 |
+ ( make time ) |
|
| 108 |
+ .DateTime/hour DEI .time-buf/h ;decimal JSR2 |
|
| 109 |
+ .DateTime/minute DEI .time-buf/m ;decimal JSR2 |
|
| 110 |
+ .DateTime/second DEI .time-buf/s ;decimal JSR2 |
|
| 111 |
+ ( draw label ) |
|
| 101 | 112 |
.time/x LDZ2 .Screen/x DEO2 |
| 102 | 113 |
.time/y LDZ2 .Screen/y DEO2 |
| 103 |
- ;make-time JSR2 |
|
| 104 |
- ;time-txt ;draw-text JSR2 |
|
| 114 |
+ ;time-buf ;draw-text JSR2 |
|
| 115 |
+ ( draw needles ) |
|
| 116 |
+ #00 ;draw-needles JSR2 |
|
| 117 |
+ ;make-needles JSR2 |
|
| 118 |
+ #01 ;draw-needles JSR2 |
|
| 105 | 119 |
DUP .last/sec STZ |
| 106 | 120 |
&same-sec |
| 107 | 121 |
POP |
| ... | ... |
@@ -109,12 +123,14 @@ BRK |
| 109 | 123 |
( once per day ) |
| 110 | 124 |
.DateTime/day DEI |
| 111 | 125 |
DUP .last/day LDZ = ,&same-day JCN |
| 126 |
+ ( make date ) |
|
| 127 |
+ .DateTime/day DEI .date-buf ;decimal JSR2 |
|
| 128 |
+ ( draw label ) |
|
| 112 | 129 |
.date/x LDZ2 .Screen/x DEO2 |
| 113 | 130 |
.date/y LDZ2 .Screen/y DEO2 |
| 114 | 131 |
.DateTime/dotw DEI 4* TOS ;week-txt ++ ;draw-text JSR2 |
| 115 | 132 |
.DateTime/month DEI 4* TOS ;month-txt ++ ;draw-text JSR2 |
| 116 |
- ;make-date JSR2 |
|
| 117 |
- ;date-txt ;draw-text JSR2 |
|
| 133 |
+ ;date-buf ;draw-text JSR2 |
|
| 118 | 134 |
DUP .last/day STZ |
| 119 | 135 |
&same-day |
| 120 | 136 |
POP |
| ... | ... |
@@ -203,34 +219,14 @@ RTN |
| 203 | 219 |
|
| 204 | 220 |
RTN |
| 205 | 221 |
|
| 206 |
-@make-date ( -- ) |
|
| 207 |
- |
|
| 208 |
- .DateTime/day DEI |
|
| 209 |
- DUP #0a DIV #30 + ;date-txt STA |
|
| 210 |
- #0a MOD #30 + ;date-txt INC STA |
|
| 211 |
- |
|
| 212 |
-RTN |
|
| 213 |
- |
|
| 214 |
-@make-time ( -- ) |
|
| 222 |
+@decimal ( value* label* -- ) |
|
| 215 | 223 |
|
| 216 |
- .DateTime/hour DEI ;time-txt/h ,decimal JSR |
|
| 217 |
- .DateTime/minute DEI ;time-txt/m ,decimal JSR |
|
| 218 |
- .DateTime/second DEI ;time-txt/s ,decimal JSR |
|
| 219 |
- |
|
| 220 |
-RTN |
|
| 221 |
- |
|
| 222 |
-@decimal ( -- ) |
|
| 223 |
- |
|
| 224 |
- STH2 |
|
| 225 |
- DUP #0a DIV #30 + STH2kr STA |
|
| 226 |
- #0a MOD #30 + STH2r INC2 STA |
|
| 224 |
+ STH |
|
| 225 |
+ DUP #0a DIV #30 + STHkr STZ |
|
| 226 |
+ #0a MOD #30 + STHr INC STZ |
|
| 227 | 227 |
|
| 228 | 228 |
RTN |
| 229 | 229 |
|
| 230 |
-@time-txt |
|
| 231 |
- &h "00: &m "00: &s "00 $1 |
|
| 232 |
-@date-txt |
|
| 233 |
- "00 $1 |
|
| 234 | 230 |
@week-txt |
| 235 | 231 |
"Sun $1 "Mon $1 "Tue $1 "Wed $1 "Thu $1 "Fri $1 |
| 236 | 232 |
"Sat $1 |