Talk:Threaded code

message: Did I hear someone claim that "not all modern cpus have call instructions" ?
Certainly many recent homebrew CPU designs ( Wikibooks:Microprocessor Design/Wire Wrap ) don't have a call instruction -- but most people call them "retro" rather than "modern".
Which CPU would that be?
I can't think of *any* CPU built after the 1976 RCA 1802 that didn't have a call instruction.
--68.0.124.33 (talk) 18:33, 18 January 2008 (UTC)
thread_title:  modern CPU call 

message: A recent edit
implies that "threaded code" is a re-invention of something used "since the very early days of computers".
I admit to not knowing much about early mainframe computers.
So:
* Did this earlier technique have a name other than "threaded code"?
* Was this earlier technique the same as what we would now call "threaded code", or was there something different about it?
* Was this technique so very different from threaded code that it shouldn't even be mentioned on this "threaded code" article, and instead discussed on some other more relevant article?
--68.0.124.33 (talk) 05:32, 30 January 2009 (UTC)
thread_title:  the very early days of computers 

message: This article could either:
* (a) immediately present an example of threaded code, and try to explain how it works on its own terms, without getting sidetracked on bytecodes, or
* (b) start with a brief detour describing an easier-to-understand "decode and dispatch interpreter". Then show a series of simple Wittgenstein's ladder steps (described using bytecode terminology) of "development" required to convert it into threaded code.
Which approach helps people better understand this subject?
At one time, this article used approach (b).
Alas, a well-meaning edit
(  )
chopped the first step or two out of that sequence.
This leaves the "Development" section Threaded_code#Development
with several confusing dangling references to "the bytecodes" and "the decode and dispatch interpreter described above" that no longer exists.
Would this article be easier to understand if we revert to approach (b), or if we delete those dangling references and try to switch to approach (a)?
--DavidCary (talk) 18:23, 15 May 2011 (UTC)
thread_title:  development of threaded code 

message: This article uses some notation I haven't seen before, without explaining what it is or what it means, making the article difficult to understand. The notation looks a bit like C, but it's not C. Why has no-one else commented on this?--greenrd (talk) 11:21, 26 October 2013 (UTC)
thread_title:  Notation 

message: Given Forth is the most common example of a threaded code implementation, why are the examples in C rather than assembly or pseudo-code?
C and Forth are at opposite ends of the spectrum on so many issues. It just seems *wrong* to give examples of threaded code using C idioms.87.68.22.118 (talk) 19:39, 23 February 2014 (UTC)
thread_title:  Why examples in C? 

message: Simple example (in Parrot virtual machine source) with function base opcodes, switched opcode core and CGOTO core is examples/c/nanoparrot.c. I did some tests a long ago, see Nanoparrot. --mj41 (talk) 22:01, 30 October 2015 (UTC)
thread_title:  Example from register based Parrot VM  

message: Currently, the psuedocode examples are C-like enough that people might assume they follow the rules of C. However, each one of these examples falls victim to undefined behavior, more specifically, unsequenced modification and access. In order to clarify to the readers of the article the exact behavior of what this would look like in a C-like language, I believe we should rewrite the C-like pseudocode so that it does not contain what is considered undefined behavior in C. However, to try and work towards a better article, I would like to know if anybody has potentially better ideas for what could be done. I was thinking maybe switching pseudocode styles altogether? Thanks!
Bulbazord (talk) 04:10, 11 November 2016 (UTC)
thread_title:  Psuedocode examples are confusing and possibly wrong 

message: The section describing Direct Threaded code says the following:
This form is simple, but may have overheads because the thread consists only of machine addresses, so all further parameters must be loaded indirectly from memory.https://en.wikipedia.org/wiki/Threaded_code#Direct_threading
before later giving an example of direct-threaded code that contains inlined constants (A and B), in direct contradiction to the quote I've provided above. I propose the following wording be used in it's place:
This form is simple, but if the thread consists only of machine addresses, then all further parameters must be loaded indirectly from memory, which may impose overheads.
Additionally, a grammar similar to C (in particular, using switches) is used, but constants appear to be referenced via address, yet used as values! I advise replacing instances of &A or &B with simple A or B, and using a C-procedure style grammar instead of a C-switch grammar, perhaps with something like "jump" or "jump to" at the start of a reference to another piece of code, to clarify the manner in which the code in question is being used.
2602:301:7764:AC00:9ED:9E40:9294:D87 (talk) 22:39, 1 June 2019 (UTC)
thread_title:  Threading models and example syntax 

message: Abbr. "TIL" is not introduced (sub section RPL). It is probably for "threaded-interpreted language", but this is not defined (what is it precisely?).
Or threaded-interpretive language, not threaded-interpreted language?
--Mortense (talk) 18:25, 20 May 2021 (UTC)
replies: text: I have reworded this paragraph to include a definition of the term. Yes, it's threaded interpretive language, although some people erroneously use threaded-interpreted language. --Matthiaspaul (talk) 19:55, 3 August 2023 (UTC)
thread_title:  Definition of threaded-interpreted language / TIL 

message: The phrases "which reads the symbolic language a bit at a time" and "each bit exists in only one place" use the word "bit" which may be confused for the computing meaning, rather than e.g. "little". Just in case early machines did read single bits while interpreting, I opened this discussion rather than making the edit. 47.154.80.218 (talk) 18:49, 29 November 2022 (UTC)
thread_title:  Does "bit" mean "little"?