From 187f92d31d2a9ab32764e53ecf4bf812f44a21db Mon Sep 17 00:00:00 2001 From: neauoire Date: Thu, 26 Oct 2023 11:29:49 -0700 Subject: [PATCH] (console.write.tal) Added output example to /error port --- projects/examples/devices/console.write.tal | 18 ++++++++++++------ src/uxn.c | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/projects/examples/devices/console.write.tal b/projects/examples/devices/console.write.tal index 42d6366..27cdd3c 100644 --- a/projects/examples/devices/console.write.tal +++ b/projects/examples/devices/console.write.tal @@ -5,12 +5,18 @@ |0100 @on-reset ( -> ) - ;text - &while ( -- ) + ( | write ) + { "Hello 20 "Write 0a 00 } + STH2r + &wa ( -- ) LDAk .Console/write DEO - INC2 LDAk ?&while + INC2 LDAk ?&wa + POP2 + ( | error ) + { "Hello 20 "Error 0a 00 } + STH2r + &wb ( -- ) + LDAk .Console/error DEO + INC2 LDAk ?&wb POP2 BRK -@text - "Hello $1 - diff --git a/src/uxn.c b/src/uxn.c index b73fdc8..c75a203 100644 --- a/src/uxn.c +++ b/src/uxn.c @@ -13,7 +13,7 @@ WITH REGARD TO THIS SOFTWARE. /* Registers [ Z ][ Y ][ X ][ L ][ N ][ T ] < -[ . ][ . ][ . ][ H2 ][ T ] < +[ . ][ . ][ . ][ H2 ][ . ] < [ L2 ][ N2 ][ T2 ] < */