4 ms·
> "(" should be: Push next word to X-stack > ")" should be: pop and execute top of X-stack. > So "(+ m n)" is equal to "m n +" I don't get it, what is the X-
by bmacho 4y ago
> "(" should be: Push next word to X-stack
> ")" should be: pop and execute top of X-stack.
> So "(+ m n)" is equal to "m n +"
I don't get it, what is the X-stack? Also can you elaborate this example in more details?
- timonoko 4y agoX is separate execution stack. It is very short depending how many brackets you use. When I made such Forth some 50 years ago, the "pop and execute" was one cycle on Nova 1200, no overhead. And x-stack was one 8-bit page.
- bmacho 4y agoThanks. Am I getting right, ( + 1 ( - 2 3 ) ) parses as s x + s 1 x + s 1 x + - s 1 2 x + - s 1 2 3 x + - s 1 2 3 - x + s 1 2 3 - + x which should evaluate to 0?