mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-25 23:35:12 +00:00
(timer.tal) Updated example
This commit is contained in:
parent
b00cafe0f2
commit
de4a534bf4
1 changed files with 20 additions and 10 deletions
|
@ -43,21 +43,31 @@
|
||||||
!&<draw>
|
!&<draw>
|
||||||
&pause ( -- )
|
&pause ( -- )
|
||||||
[ LIT2 00 _&paused ] LDR EQU
|
[ LIT2 00 _&paused ] LDR EQU
|
||||||
( ) DUP ,&paused STR
|
( ) INCk <set-dec-color>
|
||||||
( ) INC ;<draw-num>/color STA
|
,&paused STR
|
||||||
!&<draw>
|
!&<draw>
|
||||||
&end ( -- )
|
&end ( -- )
|
||||||
#0000 .Screen/vector DEO2
|
#0000 .Screen/vector DEO2
|
||||||
#06 ;<draw-num>/color STA
|
#06 <set-dec-color>
|
||||||
!&<draw>
|
!&<draw>
|
||||||
&<draw> ( -- )
|
&<draw> ( -- )
|
||||||
#0010 DUP2 .Screen/x DEO2
|
,&time LDR !<draw-dec>
|
||||||
.Screen/y DEO2
|
|
||||||
[ LIT2 01 -Screen/auto ] DEO
|
(
|
||||||
,&time LDR DUP
|
@|drawing )
|
||||||
( x0 ) #0a DIV <draw-num>
|
|
||||||
( 0x ) #0a DIVk MUL SUB <draw-num>
|
@<set-dec-color> ( color -- )
|
||||||
JMP2r
|
;<draw-num>/color STA
|
||||||
|
JMP2r
|
||||||
|
|
||||||
|
@<draw-dec> ( dec -- )
|
||||||
|
#0010 DUP2 .Screen/x DEO2
|
||||||
|
.Screen/y DEO2
|
||||||
|
[ LIT2 01 -Screen/auto ] DEO
|
||||||
|
DUP
|
||||||
|
( x0 ) #0a DIV <draw-num>
|
||||||
|
( 0x ) #0a DIVk MUL SUB
|
||||||
|
( >> )
|
||||||
|
|
||||||
@<draw-num> ( num -- )
|
@<draw-num> ( num -- )
|
||||||
#00 SWP #30 SFT2 ;numbers-icns ADD2 .Screen/addr DEO2
|
#00 SWP #30 SFT2 ;numbers-icns ADD2 .Screen/addr DEO2
|
||||||
|
|
Loading…
Reference in a new issue