What differentiates exception frames from other data on the return stack?

Viewed 353

I'm trying to understand how exception frames are located on the return stack during a THROW.

The comments in "jonesforth.f.txt" assert that "When called, THROW walks up the return stack (the process is called 'unwinding') until it finds the exception stack frame." I'm unclear how the (EXCEPTION-MARKER) is differentiated from another other data on the return stack (return addresses, user values using >R, and indicies for do-loops).

In general, how do the various Forth's distinguish between exception frames and other data on the return stack?

2 Answers

An explanation of how it can be made to work in a typical FORTH system is the paper by Milendorf

Related