Removed errcode from stacks
This commit is contained in:
parent
bc26d9d60d
commit
fad574816d
|
@ -42,13 +42,15 @@ int
|
||||||
uxn_halt(Uxn *u, Uint8 instr, Uint8 err, Uint16 addr)
|
uxn_halt(Uxn *u, Uint8 instr, Uint8 err, Uint16 addr)
|
||||||
{
|
{
|
||||||
Uint8 *d = &u->dev[0x00];
|
Uint8 *d = &u->dev[0x00];
|
||||||
if(instr & 0x40)
|
Uint16 handler = GETVEC(d);
|
||||||
u->rst->err = err;
|
if(handler) {
|
||||||
else
|
u->wst->ptr = 4;
|
||||||
u->wst->err = err;
|
u->wst->dat[0] = addr >> 0x8;
|
||||||
if(GETVEC(d))
|
u->wst->dat[1] = addr & 0xff;
|
||||||
uxn_eval(u, GETVEC(d));
|
u->wst->dat[2] = instr;
|
||||||
else {
|
u->wst->dat[3] = err;
|
||||||
|
return uxn_eval(u, handler);
|
||||||
|
} else {
|
||||||
system_inspect(u);
|
system_inspect(u);
|
||||||
fprintf(stderr, "%s %s, by %02x at 0x%04x.\n", (instr & 0x40) ? "Return-stack" : "Working-stack", errors[err - 1], instr, addr);
|
fprintf(stderr, "%s %s, by %02x at 0x%04x.\n", (instr & 0x40) ? "Return-stack" : "Working-stack", errors[err - 1], instr, addr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue