Browse code

writing nonzero to "halt" port halts the read() loop.

neauoire authored on 17/08/2021 15:57:10
Showing 1 changed files
... ...
@@ -133,7 +133,7 @@ static void
133 133
 run(Uxn *u)
134 134
 {
135 135
 	uxn_eval(u, PAGE_PROGRAM);
136
-	while(read(0, &devconsole->dat[0x2], 1) > 0)
136
+	while((!u->dev[0].dat[0xf]) && (read(0, &devconsole->dat[0x2], 1) > 0)) 
137 137
 		uxn_eval(u, mempeek16(devconsole->dat, 0));
138 138
 }
139 139