FORTH and Threaded Interpretive Languages

first previous next last


Max-Gerd Retzlaff, 5. July 2008

https://entropia.de/GPN7

Jonesforth by Richard W. M. Jones

INDIRECT THREADED CODE -------------------------------------------------------------- : QUADRUPLE DOUBLE DOUBLE ; +------------------+ | codeword | : DOUBLE DUP + ; +------------------+ | addr of DOUBLE ---------------> +------------------+ +------------------+ | codeword | | addr of DOUBLE | +------------------+ +------------------+ | addr of DUP --------------> +------------------+ | addr of EXIT | +------------------+ | codeword -------+ +------------------+ %esi -> | addr of + --------+ +------------------+ | +------------------+ | | assembly to <-----+ | addr of EXIT | | | implement DUP | +------------------+ | | .. | | | .. | | | NEXT | | +------------------+ | +-----> +------------------+ | codeword -------+ +------------------+ | | assembly to <------+ | implement + | | .. | NEXT | .. | | NEXT | (1) reads the address of + into %eax +------------------+ (2) increments %esi by 4 (3) jumps to the indirect %eax 11