<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://gunkies.org/index.php?action=history&amp;feed=atom&amp;title=Threaded_code</id>
	<title>Threaded code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://gunkies.org/index.php?action=history&amp;feed=atom&amp;title=Threaded_code"/>
	<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Threaded_code&amp;action=history"/>
	<updated>2026-09-26T19:29:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://gunkies.org/w/index.php?title=Threaded_code&amp;diff=35662&amp;oldid=prev</id>
		<title>Jnc: Not as crisp and clear as it could be, but not bad</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Threaded_code&amp;diff=35662&amp;oldid=prev"/>
		<updated>2024-12-17T00:06:53Z</updated>

		<summary type="html">&lt;p&gt;Not as crisp and clear as it could be, but not bad&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Threaded code&amp;#039;&amp;#039;&amp;#039; is an intermediate approach to the [[execute|execution]] of [[program]]s on a computer - somewhere in between [[compiler|compiled]] and [[interpreter|interpreted]] code, but closer to the latter. The original program is converted to a [[binary]] form - but not the low-level [[object code]] that the computer&amp;#039;s [[Central Processing Unit|CPU]] can interpret directly in [[hardware]]. Instead, each pseudo-&amp;#039;[[instruction]]&amp;#039; is a somewhat higher-level operation, which the threaded-code control/interpretation code has to implement (thus creating, effectively, a [[virtual machine]] with a more powerful [[instruction set]]). &lt;br /&gt;
&lt;br /&gt;
That software maintains a pseudo-[[Program Counter|program counter]] (perhaps in another CPU [[register]]), which points to the current pseudo-instruction being &amp;#039;executed&amp;#039;. In many threaded code systems, the pseudo-instructions are simply the [[address]] of the [[subroutine|routines]] which implements the pseudo-instructions; when one routine is done, it simply [[jump]]s to the next routine (hence the name of this approach), the address of which is in the [[word]] pointed to by the pseudo-program counter. (Each implementation routine has to increment the pseudo-program counter, of course.)&lt;br /&gt;
&lt;br /&gt;
A threaded code system thus is faster than interpreted code, but its binary is more compact than object code to perform the same computation on that machine would be.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* Ronald F. Brender, [http://gordonbell.azurewebsites.net/Computer_Engineering/00000387.htm Turning Cousins into Sisters: An Example of Software Smoothing of Hardware Differences], in C. Gordon Bell, J. Craig Mudge, John. E. McNamara, &amp;#039;&amp;#039;Computer Engineering: A DEC View of Hardware Systems Design&amp;#039;&amp;#039;, Digital Press, Bedford, 1978 - a good example of threaded code in use&lt;br /&gt;
&lt;br /&gt;
[[Category: Software Basics]]&lt;/div&gt;</summary>
		<author><name>Jnc</name></author>
	</entry>
</feed>