| Issue 4: | Stack underflow breaks .S | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. DROP 2. DROP 3. .S What is the expected output? What do you see instead? .S should abort with Stack Underflow error, instead it begins dumping entire 32-bit address space with no apparent way to stop (board reset works). What version of the product are you using? On what operating system? 8.1 Please provide any additional information below. My current fix ( Safer version of .S ) : S.S SP@ sp0 @ < if ." Stack underflow" else .s then ; |
|
,
Jun 09, 2008
After a bit of study, it seems that PropellerForth Interpreter is culprit. Usually the Forth Interpreter checks the parameter stack status after each Execute. I copied this one from Starting Forth web edition. : INTERPRET ( -- ) BEGIN BL WORD FIND IF EXECUTE ?STACK ABORT" Stack empty" ELSE NUMBER THEN AGAIN ; |
|
|
|