Added error code for stack busy

This commit is contained in:
Devine Lu Linvega 2022-06-12 09:12:13 -07:00
parent 15dcde5ae9
commit 5b96cefb3a
2 changed files with 4 additions and 2 deletions

View File

@ -17,7 +17,9 @@ WITH REGARD TO THIS SOFTWARE.
static const char *errors[] = { static const char *errors[] = {
"underflow", "underflow",
"overflow", "overflow",
"division by zero"}; "division by zero",
"busy"
};
static void static void
system_print(Stack *s, char *name) system_print(Stack *s, char *name)

View File

@ -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; case 0x1f: /* SFT */ POP8(a) POP(b) PUSH(src, b >> (a & 0x0f) << ((a & 0xf0) >> 4)) break;
} }
} }
return 1; return (u->wst->ptr || u->rst->ptr) ? uxn_halt(u, instr, 4, pc - 1) : 1;
err: err:
return uxn_halt(u, instr, errcode, pc - 1); return uxn_halt(u, instr, errcode, pc - 1);
} }