1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 23:18:05 +11:00
collapseos/blk/076

12 lines
506 B
Plaintext
Raw Normal View History

Stack underflow and overflow: In each native word involving
PSP popping, we check whether the stack is big enough. If it's
not we go in "uflw" (underflow) error condition, then abort.
We don't check RSP for underflow because the cost of the check
is significant and its usefulness is dubious: if RSP isn't
tightly in control, we're screwed anyways, and that, well
before we reach underflow.
Overflow condition happen when RSP and PSP meet somewhere in
the middle. That check is made at each "next" call.