From fd907e87d6623dfd9dc104a38ffdd4a607f3362e Mon Sep 17 00:00:00 2001 From: neauoire Date: Tue, 17 Aug 2021 08:57:10 -0700 Subject: [PATCH] writing nonzero to "halt" port halts the read() loop. --- src/uxncli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uxncli.c b/src/uxncli.c index 1c76d6b..9cce780 100644 --- a/src/uxncli.c +++ b/src/uxncli.c @@ -133,7 +133,7 @@ static void run(Uxn *u) { uxn_eval(u, PAGE_PROGRAM); - while(read(0, &devconsole->dat[0x2], 1) > 0) + while((!u->dev[0].dat[0xf]) && (read(0, &devconsole->dat[0x2], 1) > 0)) uxn_eval(u, mempeek16(devconsole->dat, 0)); }