diff --git a/src/devices/system.c b/src/devices/system.c index c420a9a..f9a83a4 100644 --- a/src/devices/system.c +++ b/src/devices/system.c @@ -17,14 +17,14 @@ WITH REGARD TO THIS SOFTWARE. static const char *errors[] = { "underflow", "overflow", - "division by zero", - "Busy" + "division by zero" }; static void system_print(Stack *s, char *name) { Uint8 i; + fprintf(stderr, "<%s>", name); for(i = 0; i < s->ptr; i++) fprintf(stderr, " %02x", s->dat[i]); @@ -36,8 +36,10 @@ system_print(Stack *s, char *name) void system_inspect(Uxn *u) { - system_print(u->wst, "wst"); - system_print(u->rst, "rst"); + if(u->wst->ptr) + system_print(u->wst, "wst"); + if(u->rst->ptr) + system_print(u->rst, "rst"); } int diff --git a/src/uxn.c b/src/uxn.c index 8c1ea8c..6aaa73a 100644 --- a/src/uxn.c +++ b/src/uxn.c @@ -88,7 +88,7 @@ uxn_eval(Uxn *u, Uint16 pc) case 0x1f: /* SFT */ POP8(a) POP(b) PUSH(src, b >> (a & 0x0f) << ((a & 0xf0) >> 4)) break; } } - return (u->wst->ptr || u->rst->ptr) ? uxn_halt(u, instr, 4, pc - 1) : 1; + return 1; err: return uxn_halt(u, instr, errcode, pc - 1); }