Can you show the return stack in Forth?
.S shows the parameter stack. Is there a similar word showing the contents of the return stack?
.S
I found SHOWSTACK on the web, but it does't work.
I think you could use this code if you are curious about the return stack:
: RTEST RP@ DUP >R RP@ RDROP SWAP - ; RTEST CONSTANT RSTEP RP@ CONSTANT RBIAS : .RETURNSTACK \ -- RP@ RBIAS DO I @ U. RSTEP +LOOP CR ;
There's no such word in ANS Forth.
As for Gforth, there is the word bt since late 2012.
bt
I think you could use this code if you are curious about the return stack: