commit 52d5e2d694c03b5c272909756563c9231197a7b5
parent a1d18f62f3433a1648ee136047a3b8cff141cff8
Author: neauoire <aliceffekt@gmail.com>
Date: Thu, 26 Aug 2021 20:12:56 -0700
Single vector uxncli
Diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/uxncli.c b/src/uxncli.c
@@ -132,9 +132,13 @@ uxn_halt(Uxn *u, Uint8 error, char *name, int id)
static void
run(Uxn *u)
{
- uxn_eval(u, PAGE_PROGRAM);
- while((!u->dev[0].dat[0xf]) && (read(0, &devconsole->dat[0x2], 1) > 0))
- uxn_eval(u, mempeek16(devconsole->dat, 0));
+ Uint16 vec = PAGE_PROGRAM;
+ uxn_eval(u, vec);
+ while((!u->dev[0].dat[0xf]) && (read(0, &devconsole->dat[0x2], 1) > 0)) {
+ vec = mempeek16(devconsole->dat, 0);
+ if (!vec) vec = u->ram.ptr; /* continue after last BRK */
+ uxn_eval(u, vec);
+ }
}
static int