http://wiki.intellivision.us/index.php?title=Introducing_the_Instruction_Set_Part_2&feed=atom&action=history
Introducing the Instruction Set Part 2 - Revision history
2024-03-28T10:20:20Z
Revision history for this page on the wiki
MediaWiki 1.30.0
http://wiki.intellivision.us/index.php?title=Introducing_the_Instruction_Set_Part_2&diff=14822&oldid=prev
Mr z: Protected "Introducing the Instruction Set Part 2" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))
2010-12-04T08:41:45Z
<p>Protected "<a href="/index.php/Introducing_the_Instruction_Set_Part_2" title="Introducing the Instruction Set Part 2">Introducing the Instruction Set Part 2</a>" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr style="vertical-align: top;" lang="en">
<td colspan="1" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: white; color:black; text-align: center;">Revision as of 08:41, 4 December 2010</td>
</tr><tr><td colspan="2" style="text-align: center;" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Mr z
http://wiki.intellivision.us/index.php?title=Introducing_the_Instruction_Set_Part_2&diff=2634&oldid=prev
Mr z: /* Moving On */
2007-10-09T22:56:06Z
<p><span dir="auto"><span class="autocomment">Moving On</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 22:56, 9 October 2007</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l60" >Line 60:</td>
<td colspan="2" class="diff-lineno">Line 60:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* [[Introducing the Instruction Set Part 1]]:  The CPU, Memory and Registers; Primary Instructions and Addressing Modes</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* [[Introducing the Instruction Set Part 1]]:  The CPU, Memory and Registers; Primary Instructions and Addressing Modes</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><!--* [[Introducing the Instruction Set Part 2]]:  Single Register and Implied Operand Instructions--></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><!--* [[Introducing the Instruction Set Part 2]]:  Single Register and Implied Operand Instructions--></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; 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;"><div>* [[Introducing the Instruction Set Part 3]]:  <del class="diffchange diffchange-inline">Shift </del>and <del class="diffchange diffchange-inline">Rotate Instructions</del></div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>* [[Introducing the Instruction Set Part 3]]:  <ins class="diffchange diffchange-inline">Branches, Conditional Branches </ins>and <ins class="diffchange diffchange-inline">Calls</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; 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;"><div>* [[Introducing the Instruction Set Part 4]]:  <del class="diffchange diffchange-inline">Branches, Conditional Branches </del>and <del class="diffchange diffchange-inline">Calls</del></div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>* [[Introducing the Instruction Set Part 4]]:  <ins class="diffchange diffchange-inline">Shift </ins>and <ins class="diffchange diffchange-inline">Rotate Instructions</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Or, you can return to the [[Programming Tutorials]] index.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Or, you can return to the [[Programming Tutorials]] index.</div></td></tr>
</table>
Mr z
http://wiki.intellivision.us/index.php?title=Introducing_the_Instruction_Set_Part_2&diff=2580&oldid=prev
Mr z: /* Moving On */
2007-10-08T23:08:08Z
<p><span dir="auto"><span class="autocomment">Moving On</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 23:08, 8 October 2007</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l59" >Line 59:</td>
<td colspan="2" class="diff-lineno">Line 59:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* [[Introducing the Instruction Set Part 1]]:  The CPU, Memory and Registers; Primary Instructions and Addressing Modes</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* [[Introducing the Instruction Set Part 1]]:  The CPU, Memory and Registers; Primary Instructions and Addressing Modes</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; 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;"><div>* [[Introducing the Instruction Set Part 2]]:  Single Register and Implied Operand Instructions</div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins class="diffchange diffchange-inline"><!--</ins>* [[Introducing the Instruction Set Part 2]]:  Single Register and Implied Operand Instructions--<ins class="diffchange diffchange-inline">></ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; 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;"><div><del class="diffchange diffchange-inline"><!</del>--* [[Introducing the Instruction Set Part 3]]:  Shift and Rotate Instructions<del class="diffchange diffchange-inline">--></del></div></td><td class='diff-marker'>+</td><td style="color:black; 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;"><div>* [[Introducing the Instruction Set Part 3]]:  Shift and Rotate Instructions</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* [[Introducing the Instruction Set Part 4]]:  Branches, Conditional Branches and Calls</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* [[Introducing the Instruction Set Part 4]]:  Branches, Conditional Branches and Calls</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Or, you can return to the [[Programming Tutorials]] index.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Or, you can return to the [[Programming Tutorials]] index.</div></td></tr>
</table>
Mr z
http://wiki.intellivision.us/index.php?title=Introducing_the_Instruction_Set_Part_2&diff=2579&oldid=prev
Mr z: /* Implied Operand Instructions */
2007-10-08T23:07:49Z
<p><span dir="auto"><span class="autocomment">Implied Operand Instructions</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 23:07, 8 October 2007</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l53" >Line 53:</td>
<td colspan="2" class="diff-lineno">Line 53:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>SETC, CLRC and NOP are fairly self explanatory.  EIS and DIS are also straightforward, though interrupts are beyond the scope of this tutorial. They are important, and I will cover them in a future tutorial.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>SETC, CLRC and NOP are fairly self explanatory.  EIS and DIS are also straightforward, though interrupts are beyond the scope of this tutorial. They are important, and I will cover them in a future tutorial.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;">= Moving On =</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;">At this point, you may wish to continue with the remaining parts of this tutorial:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;">* [[Introducing the Instruction Set Part 1]]:  The CPU, Memory and Registers; Primary Instructions and Addressing Modes</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;">* [[Introducing the Instruction Set Part 2]]:  Single Register and Implied Operand Instructions</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;"><!--* [[Introducing the Instruction Set Part 3]]:  Shift and Rotate Instructions--></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;">* [[Introducing the Instruction Set Part 4]]:  Branches, Conditional Branches and Calls</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; 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;"><div><ins style="font-weight: bold; text-decoration: none;">Or, you can return to the [[Programming Tutorials]] index.</ins></div></td></tr>
</table>
Mr z
http://wiki.intellivision.us/index.php?title=Introducing_the_Instruction_Set_Part_2&diff=2573&oldid=prev
Mr z at 23:01, 8 October 2007
2007-10-08T23:01:39Z
<p></p>
<p><b>New page</b></p><div>[[Category:Programming]][[Category:Tutorial]]<br />
<br />
This short part covers the Single Register Arithmetic instructions as well as the Implied Operand instructions. If you haven't read it already, please see [[Introducing the Instruction Set Part 1]].<br />
<br />
= Single Register Arithmetic Instructions =<br />
<br />
These instructions are fairly simple instructions that operate on a single register:<br />
<br />
<TABLE BORDER><br />
<TR><TH>&nbsp;&nbsp;[[TSTR]]&nbsp;&nbsp;</TH><TD COLSPAN=2>Check sign, zero on a register </TD></TR><br />
<TR><TH>&nbsp;&nbsp;[[CLRR]]&nbsp;&nbsp;</TH><TD>Set a register to 0 </TD><TD> R = 0 </TD></TR><br />
<TR><TH>&nbsp;&nbsp;[[INCR]]&nbsp;&nbsp;</TH><TD>Increment a register </TD><TD> R = R + 1 </TD></TR><br />
<TR><TH>&nbsp;&nbsp;[[DECR]]&nbsp;&nbsp;</TH><TD>Decrement a register </TD><TD> R = R - 1 </TD></TR><br />
<TR><TH>&nbsp;&nbsp;[[NEGR]]&nbsp;&nbsp;</TH><TD>Negate a register </TD><TD> R = -R </TD></TR><br />
<TR><TH>&nbsp;&nbsp;[[COMR]]&nbsp;&nbsp;</TH><TD>1s complement a register </TD><TD> R = R XOR $FFFF </TD></TR><br />
<TR><TH>&nbsp;&nbsp;[[ADCR]]&nbsp;&nbsp;</TH><TD>Add carry bit to register </TD><TD> R = R + C </TD></TR><br />
</TABLE><br />
<br />
These instructions work equally on all 8 registers. That includes the program counter. For instance, "INCR R7" (aka. INCR PC) will skip the next instruction word. That can be useful for skipping single-word instructions. "DECR R7" (aka. DECR PC) is equivalent to "here: B here", but is one byte shorter.<br />
<br />
Example: Consider the value of R0 at each step in this sequence as it executes:<br />
<br />
CLRR R0 ; Clear R0: R0 = 0<br />
INCR R0 ; Add 1 to R0: R0 = 1<br />
DECR R0 ; Subtract 1 from R0: R0 = 0<br />
COMR R0 ; 1s complement R0: R0 = $FFFF<br />
NEGR R0 ; Negate R0: R0 = 1<br />
<br />
<br />
The ADCR instruction is useful for extended precision arithmetic. The following example shows how to add the 32-bit number in R3:R2 to the 32-bit number in R1:R0. (R3 and R1 hold the upper halves of the 32-bit numbers, whereas R2 and R0 hold the lower halves.)<br />
<CODE><pre><br />
; Add lower halves together. This generates a carry in 'C'<br />
ADDR R2, R0 <br />
<br />
; Add carry into upper half of result<br />
ADCR R1<br />
<br />
; Now add upper halves together.<br />
ADDR R3, R1<br />
</pre></CODE><br />
<br />
= Implied Operand Instructions =<br />
<br />
These instructions don't operate on any register:<br />
<br />
<TABLE BORDER><br />
<TR><TH>&nbsp;&nbsp;[[NOP]]&nbsp;&nbsp;</TH><TD> No operation</TD></TR><br />
<TR><TH>&nbsp;&nbsp;[[SETC]]&nbsp;&nbsp;</TH><TD>Set carry flag</TD></TR><br />
<TR><TH>&nbsp;&nbsp;[[CLRC]]&nbsp;&nbsp;</TH><TD>Clear carry flag</TD></TR><br />
<TR><TH>&nbsp;&nbsp;[[EIS]]&nbsp;&nbsp;</TH><TD> Enable interrupts</TD></TR><br />
<TR><TH>&nbsp;&nbsp;[[DIS]]&nbsp;&nbsp;</TH><TD> Disable interrupts</TD></TR><br />
</TABLE><br />
<br />
SETC, CLRC and NOP are fairly self explanatory. EIS and DIS are also straightforward, though interrupts are beyond the scope of this tutorial. They are important, and I will cover them in a future tutorial.</div>
Mr z