Display time left
This commit is contained in:
parent
76a25b9ba8
commit
600048613f
|
@ -134,10 +134,14 @@
|
||||||
[ LIT2 15 -Screen/auto ] DEO
|
[ LIT2 15 -Screen/auto ] DEO
|
||||||
.remaining-seconds LDZ2 ORAk ?{ POP2 ;dict/min0 !<draw-uf2> }
|
.remaining-seconds LDZ2 ORAk ?{ POP2 ;dict/min0 !<draw-uf2> }
|
||||||
( | minutes )
|
( | minutes )
|
||||||
( x0 ) DUP2 #0258 DIV2 NIP [ LIT "0 ] ADD <draw-char>
|
( x0 ) DUP2 #0258 DIV2 NIP DUP #00 EQU ?{
|
||||||
( 0x ) DUP2 #003c DIV2 NIP #0a DIVk MUL SUB [ LIT "0 ] ADD <draw-char>
|
DUP [ LIT "0 ] ADD <draw-char> }
|
||||||
POP2 ;dict/min0 <draw-uf2>
|
POP
|
||||||
JMP2r
|
( 0x ) DUP2 #003c DIV2 NIP <draw-uf2-dec>
|
||||||
|
( : ) [ LIT ": ] <draw-char>
|
||||||
|
( | seconds )
|
||||||
|
( x0 ) DUP2 #003c DIV2k MUL2 SUB2 #000a DIV2 NIP <draw-uf2-dec>
|
||||||
|
( 0x ) #000a DIV2k MUL2 SUB2 NIP !<draw-uf2-dec>
|
||||||
|
|
||||||
@<draw-labels> ( -- )
|
@<draw-labels> ( -- )
|
||||||
#003c .Screen/x DEO2
|
#003c .Screen/x DEO2
|
||||||
|
@ -158,6 +162,10 @@
|
||||||
INC2 LDAk ?&>while
|
INC2 LDAk ?&>while
|
||||||
POP2 JMP2r
|
POP2 JMP2r
|
||||||
|
|
||||||
|
@<draw-uf2-dec> ( -- )
|
||||||
|
#0a DIVk MUL SUB [ LIT "0 ] ADD
|
||||||
|
( >> )
|
||||||
|
|
||||||
@<draw-char> ( char -- )
|
@<draw-char> ( char -- )
|
||||||
#20 SUB #00 SWP
|
#20 SUB #00 SWP
|
||||||
( addr ) DUP2 #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
|
( addr ) DUP2 #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
|
||||||
|
|
Loading…
Reference in New Issue