mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
report address stack overflow errors
FossilOrigin-Name: 26aa472ace0283eec8f0471db5aef1ba67bcbdd837c7149bd1c9e966b95f24c0
This commit is contained in:
parent
53acb9ca20
commit
f0f670cc13
2 changed files with 6 additions and 1 deletions
|
@ -308,6 +308,11 @@ void rre_execute(CELL cell, int silent) {
|
||||||
printf("At %d, opcode %d\n", ip, opcode);
|
printf("At %d, opcode %d\n", ip, opcode);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
if (rp < 0 || rp > ADDRESSES) {
|
||||||
|
printf("\nERROR (nga/rre_execute): Address Stack Limits Exceeded!\n");
|
||||||
|
printf("At %d, opcode %d\n", ip, opcode);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
ip++;
|
ip++;
|
||||||
if (rp == 0)
|
if (rp == 0)
|
||||||
|
|
|
@ -412,7 +412,7 @@ Apply q to x, y, and z.
|
||||||
Execute quote until quote returns a flag of 0. In high level code:
|
Execute quote until quote returns a flag of 0. In high level code:
|
||||||
|
|
||||||
:while (q-)
|
:while (q-)
|
||||||
[ repeat dup dup push call swap 0; drop again ] call drop ;
|
[ repeat dup push call pop swap 0; drop again ] call drop ;
|
||||||
|
|
||||||
This is manually translated to assembly and inlined for performance.
|
This is manually translated to assembly and inlined for performance.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue