threaded code


threaded code

(programming)A technique for implementing virtual machineinterpreters, introduced by J.R. Bell in 1973, where eachop-code in the virtual machine instruction set is theaddress of some (lower level) code to perform the requiredoperation. This kind of virtual machine can be implementedefficiently in machine code on most processors by simplyperforming an indirect jump to the address which is the nextinstruction.

Many Forth implementations use threaded code and nowadayssome use the term "threading" for almost any technique used toimplement Forth's virtual machine.

http://complang.tuwien.ac.at/forth/threaded-code.html.

["James R. Bell", "Threaded Code", CACM, 1973, 16, 6, pp370-372].

["An Architectural Trail to Threaded Code Systems", Kogge,P. M., IEEE Computer, March 1982].