aw / fiveforths

32-bit RISC-V Forth for microcontrollers
https://fiveforths.a1w.ca
MIT License
66 stars 3 forks source link

Add bounds checks for stacks: overflow and underflow #7

Closed aw closed 1 year ago

aw commented 1 year ago

It is currently possible to POP from the stacks even if nothing is there (underflow), and PUSH to the stacks if it's full (overflow). This applies to the DSP and RSP stack only, since TIB already has bounds checks.