xdrop
Jos-Ven opened this issue · 1 comments
Jos-Ven commented
Hi, I am a bit puzzled by the following:
Under Win32Forth and Gforth I can use xdrop as follows :
: xdrop ( nx..n1 #n - ) >r sp@ r> cells + sp! ;
1000 1 2 3 4 5 5 xdrop . \ 1000 ok
To see the 1000 under Cforth on a ESP32 I have to use the following:
: xdrop-V2 ( nx..n1 #n - ) >r sp@ r> 1- cells + sp! drop ;
1000 1 2 3 4 5 5 xdrop-V2 . \ 1000 ok
Any comment is welcome.
MitchBradley commented
Cforth caches the top of stack in a register.