4 ms·
The traditional FORTH "overlay" is to use FORGET. You create a dummy word to serve as a marker, like ": OVERLAY ;" or something, then later, you can "FORGET OVE
by oofoe 11y ago
The traditional FORTH "overlay" is to use FORGET. You create a dummy word to serve as a marker, like ": OVERLAY ;" or something, then later, you can "FORGET OVERLAY" and load in new code to replace it. This only affects the dictionary -- the stack and heap (if any) aren't touched.
The new ANS hotness is the "MARKER" word, you just say "MARKER OVERLAY" and then you can just invoke OVERLAY later and it clears things out for you. See Elizabeth Rather's comment here: http://computer-programming-forum.com/22-forth/c67f31fe1e09b166.htm http://computer-programming-forum.com/22-forth/c67f31fe1e09b...