On compiling. (Was a way off topic subject)

Kelly Fergason kfergason at gmail.com
Fri Jun 25 05:31:38 CDT 2021

> On Jun 25, 2021, at 4:54 AM, Gordon Henderson via cctalk <cctalk at classiccmp.org> wrote:
> On Wed, 23 Jun 2021, Van Snyder via cctalk wrote:
>>> On Wed, 2021-06-23 at 13:36 -0400, Paul Koning via cctalk wrote:
>>> Typical FORTH implementations are neat in that respect, since they
>>> use a threaded code encoding that allows for fast and efficient
>>> switching between threaded code (subroutine calls) and straight
>>> machine code.
>> I have a vague recollection of a story about a FORTH processor that put
>> the addresses of the functions to be executed on the return-address
>> stack (68000?) and then executed a RETURN instruction.
> I saw this on the 6502 in Woz's Sweet-16 interpreter.
> see e.g.
> http://www.6502.org/source/interpreters/sweet16.htm#When_is_an_RTS_really_a_JSR_
> I initialiy used this "trick" in my own little bytecode VM but it's somewhat slower than some other methods, but as usual the trade-off is code-size vs. speed...
> Gordon

yeah standard 6502 trick to keep a jump table.  

More information about the cctalk mailing list