|P-Code and virtual machines email@example.com (1994-03-23)|
|Threaded code (was Re: P-Code and virtual machines) mark@godzilla.Quotron.COM) (1994-03-26)|
|Threaded code (was Re: P-Code and virtual machines) firstname.lastname@example.org (Stephen J Bevan) (1994-03-27)|
|Re: Threaded code (was Re: P-Code and virtual machines) email@example.com (1994-03-29)|
|Re: Threaded code (was Re: P-Code and virtual machines) firstname.lastname@example.org (Ulrich Hoffmann) (1994-03-30)|
|From:||email@example.com (David Keppel)|
|Organization:||Computer Science & Engineering, U. of Washington, Seattle|
|Date:||Tue, 29 Mar 1994 04:37:27 GMT|
mark@godzilla.Quotron.COM (Mark T. Price (sg)) writes:
>[What's threaded code? What's a reference for threaded code?]
The general idea is that code for
is encoded as an array of words/bytes/whatever such as:
Initially, a variable `tp' is set to point at the first word (&foo) and
there is a jump to address pointed to by tp; in this case `foo'. Each
code fragment performs some processing and also increments `tp' past any
arguments (e.g., 10). Finally, the code fragment ends by performing
another indirect branch through the value of `tp'.
%A James R. Bell
%T Threaded Code
%J Communications of the ACM (CACM)
%D June 1973
%A Richard H. Eckhouse Jr.
%A L. Robert Morris
%T Minicomputer Systems Organization, Programming, and Applications
(PDP-11). 2nd Ed.
%I Prentice-Hall, Inc.
%A Peter M. Kogge
%T An Architectural Trail to Threaded Code Systems
%J IEEE Computer
%D March 1982
The second one ([EM79]) includes a cute variation on threaded code called
`knotted code' for use where certain routines are invoked in series e.g.,
the above example is encoded as
where `foo2' is like `foo' but it iterates until it reaches the
There is also something called `indirect threaded code' which is described
%A B. K. Dewar
%T Indirect Threaded Code
%D June 1975
(Unfortunately there's an error in the example, so don't expect it to make
total sense; I spoke with the author a few years ago and he didn't have a
quick'n'ready patch to fix it.)
There is also a discussion of threaded code in the `comp.compilers'
archives from some time in 1991.
;-D on ( What was that about user-level threads? ) Pardo
Return to the
Search the comp.compilers archives again.