Get the latest tech news
Implementing DOES> in Forth, the entire reason I started this mess
Implementing DOES> in Forth, the entire reason I started this mess
Somehow, it needs to modify the newly created word to not only push the address of its body onto the stack, but execute the code that appears after itself. This is a small extension to forth_core_create that does the double duty of pushing the address of the body onto the stack, and setting things up to run the Forth code compiled just after that instruction: I suspect the reason why JonesForth didn't implement DOES> has to do with the direct subroutine call in the middle of a Forth word.
Or read this on Hacker News