Threaded code: Difference between revisions

Content deleted Content added
Extended the phrase on compilation
Indirect threading: Since `ip = &thread`, `*ip = &i_pushA` and `*ip + 1 = &i_pushB`. `**ip = &push` and `**ip + 1 = &A`
 
(3 intermediate revisions by 3 users not shown)
Line 191:
&add
push:
*sp++ = *(**ip + 1) // look 1 past start of indirect block for operand address
jump *(*++ip) // advance ip in thread, jump through next indirect block to next subroutine
add:
Line 377:
== External links ==
* Anton Ertl's explanatory page [http://www.complang.tuwien.ac.at/forth/threaded-code.html What is Threaded Code?] describes different threading techniques and provides further references.
* [httphttps://thinking-forth.sourceforge.net/ Thinking Forth Project] includes the seminal (but out of print) book Thinking Forth by [http://home.earthlink.net/~lbrodie/ Leo Brodie] {{Webarchive|url=https://web.archive.org/web/20051113041339/http://home.earthlink.net/~lbrodie/ |date=2005-11-13 }} published in 1984.
* [http://www.forth.com/starting-forth/ Starting FORTH] online version of the book Starting FORTH by [http://home.earthlink.net/~lbrodie/ Leo Brodie] {{Webarchive|url=https://web.archive.org/web/20051113041339/http://home.earthlink.net/~lbrodie/ |date=2005-11-13 }} published in 1981.
* Brad Rodriguez's [http://www.bradrodriguez.com/papers/moving1.htm Moving FORTH: Part 1: Design Decisions in the Forth Kernel] covers threading techniques in depth.