<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://halfgeek.org/wiki/index.php?action=history&amp;feed=atom&amp;title=SIMPLESEM</id>
	<title>SIMPLESEM - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://halfgeek.org/wiki/index.php?action=history&amp;feed=atom&amp;title=SIMPLESEM"/>
	<link rel="alternate" type="text/html" href="https://halfgeek.org/wiki/index.php?title=SIMPLESEM&amp;action=history"/>
	<updated>2026-05-28T12:11:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://halfgeek.org/wiki/index.php?title=SIMPLESEM&amp;diff=281&amp;oldid=prev</id>
		<title>161.253.47.104 at 08:19, 26 October 2005</title>
		<link rel="alternate" type="text/html" href="https://halfgeek.org/wiki/index.php?title=SIMPLESEM&amp;diff=281&amp;oldid=prev"/>
		<updated>2005-10-26T08:19:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 08:19, 26 October 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l93&quot; &gt;Line 93:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 93:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=References=&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=References=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Carlo Ghezzi, Mehdi Jazayeri.  &amp;#039;&amp;#039;&lt;/del&gt;Programming Language Concepts&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;&amp;#039;, 3rd Ed.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* [[&lt;/ins&gt;Programming Language Concepts &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(book)]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=See Also=&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=See Also=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [http://www.infosys.tuwien.ac.at/pl-book/simplesem/ A SIMPLESEM interpreter]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [http://www.infosys.tuwien.ac.at/pl-book/simplesem/ A SIMPLESEM interpreter]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key halfgeek_org_1-kb2_:diff::1.12:old-280:rev-281 --&gt;
&lt;/table&gt;</summary>
		<author><name>161.253.47.104</name></author>
		
	</entry>
	<entry>
		<id>https://halfgeek.org/wiki/index.php?title=SIMPLESEM&amp;diff=280&amp;oldid=prev</id>
		<title>161.253.47.104 at 08:15, 26 October 2005</title>
		<link rel="alternate" type="text/html" href="https://halfgeek.org/wiki/index.php?title=SIMPLESEM&amp;diff=280&amp;oldid=prev"/>
		<updated>2005-10-26T08:15:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 08:15, 26 October 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;SIMPLESEM&amp;#039;&amp;#039;&amp;#039; is the silly pseudo-assembly being used in my paradigms class.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;SIMPLESEM&amp;#039;&amp;#039;&amp;#039; is the silly pseudo-assembly being used in my &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[GWU CSCI 169|&lt;/ins&gt;paradigms class&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]]&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Architecture=&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Architecture=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key halfgeek_org_1-kb2_:diff::1.12:old-279:rev-280 --&gt;
&lt;/table&gt;</summary>
		<author><name>161.253.47.104</name></author>
		
	</entry>
	<entry>
		<id>https://halfgeek.org/wiki/index.php?title=SIMPLESEM&amp;diff=279&amp;oldid=prev</id>
		<title>161.253.47.104 at 08:15, 26 October 2005</title>
		<link rel="alternate" type="text/html" href="https://halfgeek.org/wiki/index.php?title=SIMPLESEM&amp;diff=279&amp;oldid=prev"/>
		<updated>2005-10-26T08:15:07Z</updated>

		<summary type="html">&lt;p&gt;&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;SIMPLESEM&amp;#039;&amp;#039;&amp;#039; is the silly pseudo-assembly being used in my paradigms class.&lt;br /&gt;
&lt;br /&gt;
=Architecture=&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s a Harvard architecture (unlike Von Neumann architecture, it stores code and data in separate data segments).&lt;br /&gt;
&lt;br /&gt;
Code is stored in the array C[], and data in the array D[].  C and D are zero-based and programs and data are expected to start at C[0] and D[0].  In D[X], X is an lvalue and D[X] is an rvalue.&lt;br /&gt;
&lt;br /&gt;
The (only) register ip is the instruction pointer.  An index to C, it is initialized to 0.&lt;br /&gt;
&lt;br /&gt;
The processor operates by repeating the following, in order, until a halt instruction:&lt;br /&gt;
&lt;br /&gt;
# Fetch the instruction C[ip]&lt;br /&gt;
# Increment ip&lt;br /&gt;
# Execute the fetched instruction&lt;br /&gt;
&lt;br /&gt;
ip is thus the value of the next instruction by the time the current instruction is executed.  The program&lt;br /&gt;
&lt;br /&gt;
 set write, ip&lt;br /&gt;
 halt&lt;br /&gt;
&lt;br /&gt;
accordingly outputs 1 (the output line is C[0]).&lt;br /&gt;
&lt;br /&gt;
=Instructions=&lt;br /&gt;
&lt;br /&gt;
==set==&lt;br /&gt;
&lt;br /&gt;
 set target, D[source]&lt;br /&gt;
&lt;br /&gt;
Where &amp;#039;&amp;#039;target&amp;#039;&amp;#039; and &amp;#039;&amp;#039;source&amp;#039;&amp;#039; are as read.  Like&lt;br /&gt;
&lt;br /&gt;
 D[target] = D[source]&lt;br /&gt;
&lt;br /&gt;
traditionally.&lt;br /&gt;
&lt;br /&gt;
 set 10, D[20]&lt;br /&gt;
&lt;br /&gt;
copies D[20] to D[10].&lt;br /&gt;
&lt;br /&gt;
===Memory indirection===&lt;br /&gt;
&lt;br /&gt;
The distinction between lvalue and rvalue is important because SIMPLESEM allows indirection.  That is,&lt;br /&gt;
&lt;br /&gt;
 set D[10], D[20]&lt;br /&gt;
&lt;br /&gt;
is not what the na&amp;amp;iuml;ve might expect; it means&lt;br /&gt;
&lt;br /&gt;
 D[D[10]] = D[20]&lt;br /&gt;
&lt;br /&gt;
because &amp;#039;&amp;#039;target&amp;#039;&amp;#039; is an address.&lt;br /&gt;
&lt;br /&gt;
===read and write===&lt;br /&gt;
&lt;br /&gt;
The variables &amp;#039;&amp;#039;read&amp;#039;&amp;#039; and &amp;#039;&amp;#039;write&amp;#039;&amp;#039; (which are not locations&amp;amp;mdash;they are not ever subscripts to D) are mapped to stdio, so that&lt;br /&gt;
&lt;br /&gt;
 set 15, read&lt;br /&gt;
&lt;br /&gt;
means to read a value to D[15], and&lt;br /&gt;
&lt;br /&gt;
 set write, D[50]&lt;br /&gt;
&lt;br /&gt;
means to write D[50].&lt;br /&gt;
&lt;br /&gt;
===Arithmetic expressions===&lt;br /&gt;
&lt;br /&gt;
Unlike real assembly, arithmetic is performed inline with set:&lt;br /&gt;
&lt;br /&gt;
 set 99, D[15]+D[33]*D[41]&lt;br /&gt;
&lt;br /&gt;
works as expected.  The need for accumulators/registers is thus obviated.&lt;br /&gt;
&lt;br /&gt;
==jump==&lt;br /&gt;
&lt;br /&gt;
 jump location&lt;br /&gt;
&lt;br /&gt;
An unconditional jump.  It&amp;#039;s no more complex than it looks (SIMPLESEM isn&amp;#039;t pipelined).  If ip is involved somehow, remember that it is set to the index after the current instruction.&lt;br /&gt;
&lt;br /&gt;
 jump 47&lt;br /&gt;
 jump D[13]&lt;br /&gt;
&lt;br /&gt;
work as expected.&lt;br /&gt;
&lt;br /&gt;
==jumpt==&lt;br /&gt;
&lt;br /&gt;
 jumpt location, conditional&lt;br /&gt;
&lt;br /&gt;
The same as jump, with a conditional clause.  Like the arithmetic, conditional operators (like &amp;amp;lt; and &amp;amp;gt;) are inlined:&lt;br /&gt;
&lt;br /&gt;
 jumpt 47, D[3] &amp;gt; D[8]&lt;br /&gt;
&lt;br /&gt;
jumps the program to C[47] (that is, sets ip = 47 then continues) only if D[3] is greater than D[8].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
Carlo Ghezzi, Mehdi Jazayeri.  &amp;#039;&amp;#039;Programming Language Concepts&amp;#039;&amp;#039;, 3rd Ed.&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
* [http://www.infosys.tuwien.ac.at/pl-book/simplesem/ A SIMPLESEM interpreter]&lt;/div&gt;</summary>
		<author><name>161.253.47.104</name></author>
		
	</entry>
</feed>