mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-06 02:31:01 +11:00
d1de99d8c9
Also, remove underflow checks from next: it's taxing and useless because underflow check already takes place in each relevant native word.
12 lines
506 B
Plaintext
12 lines
506 B
Plaintext
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.
|