0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-19 04:15:10 +00:00
uxn/projects/examples/devices/console.write.tal

22 lines
355 B
Tal

( usage: uxncli console.write.rom )
|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1
|0100
@on-reset ( -> )
( | write )
{ "Hello 20 "Write 0a 00 }
STH2r
&wa ( -- )
LDAk .Console/write DEO
INC2 LDAk ?&wa
POP2
( | error )
{ "Hello 20 "Error 0a 00 }
STH2r
&wb ( -- )
LDAk .Console/error DEO
INC2 LDAk ?&wb
POP2 BRK