commit 5b96cef
Devine Lu Linvega
·
2022-06-12 16:12:13 +0000 UTC
parent 15dcde5
Added error code for stack busy
2 files changed,
+4,
-2
+3,
-1
1@@ -17,7 +17,9 @@ WITH REGARD TO THIS SOFTWARE.
2 static const char *errors[] = {
3 "underflow",
4 "overflow",
5- "division by zero"};
6+ "division by zero",
7+ "busy"
8+};
9
10 static void
11 system_print(Stack *s, char *name)
+1,
-1
1@@ -88,7 +88,7 @@ uxn_eval(Uxn *u, Uint16 pc)
2 case 0x1f: /* SFT */ POP8(a) POP(b) PUSH(src, b >> (a & 0x0f) << ((a & 0xf0) >> 4)) break;
3 }
4 }
5- return 1;
6+ return (u->wst->ptr || u->rst->ptr) ? uxn_halt(u, instr, 4, pc - 1) : 1;
7 err:
8 return uxn_halt(u, instr, errcode, pc - 1);
9 }