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