<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hades.mech.northwestern.edu//index.php?action=history&amp;feed=atom&amp;title=NU32v2%3A_Digital_I%2FO_Assembly_Code</id>
	<title>NU32v2: Digital I/O Assembly Code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://hades.mech.northwestern.edu//index.php?action=history&amp;feed=atom&amp;title=NU32v2%3A_Digital_I%2FO_Assembly_Code"/>
	<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;action=history"/>
	<updated>2026-04-11T14:00:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=23704&amp;oldid=prev</id>
		<title>Lynch at 11:22, 16 January 2016</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=23704&amp;oldid=prev"/>
		<updated>2016-01-16T11:22:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:22, 16 January 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&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 colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;&#039;&#039;&#039;THIS PAGE REFERS TO A PRE-RELEASE VERSION OF THE NU32 PIC32 DEVELOPMENT BOARD.  FOR INFORMATION, SAMPLE CODE, AND VIDEOS RELATED TO THE PRODUCTION VERSION (2016 AND LATER), AND TO THE CORRESPONDING BOOK &quot;EMBEDDED COMPUTING AND MECHATRONICS WITH THE PIC32 MICROCONTROLLER,&quot; VISIT [[NU32|THE NU32 PAGE]].&#039;&#039;&#039;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Let&#039;s say we called our source code digio.c.  When we compile it, we find an &quot;object code&quot; file digio.o somewhere.  I can &quot;disassemble&quot; this object code to see an assembly language version of the code.  (You can either do this directly in the MPLAB IDE, or run the command-line functions pic32-nm or pic32-objdump with your .o file as the argument.  These can be found in your C32 directory under &quot;bin.&quot;  For example, to produce the output below, I used &amp;lt;tt&amp;gt;pic32-objdump -D digio.o&amp;lt;/tt&amp;gt;.)  When we look at our disassembled code, we see a lot of stuff, including the block of code below.  I added the comments beginning with //, since we don&#039;t know assembly language. &lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Let&#039;s say we called our source code digio.c.  When we compile it, we find an &quot;object code&quot; file digio.o somewhere.  I can &quot;disassemble&quot; this object code to see an assembly language version of the code.  (You can either do this directly in the MPLAB IDE, or run the command-line functions pic32-nm or pic32-objdump with your .o file as the argument.  These can be found in your C32 directory under &quot;bin.&quot;  For example, to produce the output below, I used &amp;lt;tt&amp;gt;pic32-objdump -D digio.o&amp;lt;/tt&amp;gt;.)  When we look at our disassembled code, we see a lot of stuff, including the block of code below.  I added the comments beginning with //, since we don&#039;t know assembly language. &lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19897&amp;oldid=prev</id>
		<title>Lynch at 12:09, 26 January 2011</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19897&amp;oldid=prev"/>
		<updated>2011-01-26T12:09:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:09, 26 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;I see 11 instructions in the loop, just less than my estimated 12 instructions.  &lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;I see 11 instructions in the loop, just less than my estimated 12 instructions.  &lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/del&gt;-- Usually we have one assembly instruction per machine instruction (cycle), but sometimes an assembly instruction expands to more than one machine instruction.  Is that what&#039;s happening here---there&#039;s an extra machine instruction we&#039;re not seeing?  Or bad timing by me?  Not sure. --&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;!&lt;/ins&gt;-- Usually we have one assembly instruction per machine instruction (cycle), but sometimes an assembly instruction expands to more than one machine instruction.  Is that what&#039;s happening here---there&#039;s an extra machine instruction we&#039;re not seeing?  Or bad timing by me?  Not sure. --&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19896&amp;oldid=prev</id>
		<title>Lynch at 12:09, 26 January 2011</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19896&amp;oldid=prev"/>
		<updated>2011-01-26T12:09:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:09, 26 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 22:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 22:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;The first number in each row is the address of the instruction relative to the start of the program at 000.  (Note that the instructions are each 4 bytes long, or 32 bits, so the address of each successive instruction is 4 bytes greater than the previous one.)  The second number is the 32-bit instruction written in hexadecimal; the first several bits are for the instruction type, or &quot;opcode,&quot; and the remaining bits are to specify registers, memory locations, values, etc., used by the instruction.  The next column is the opcode in human-readable form, and the last column contains the human-readable form of the registers, memory locations, values, etc., used by the instruction.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;The first number in each row is the address of the instruction relative to the start of the program at 000.  (Note that the instructions are each 4 bytes long, or 32 bits, so the address of each successive instruction is 4 bytes greater than the previous one.)  The second number is the 32-bit instruction written in hexadecimal; the first several bits are for the instruction type, or &quot;opcode,&quot; and the remaining bits are to specify registers, memory locations, values, etc., used by the instruction.  The next column is the opcode in human-readable form, and the last column contains the human-readable form of the registers, memory locations, values, etc., used by the instruction.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;I see 11 instructions in the loop, just less than my estimated 12 instructions.  &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Usually we have one assembly instruction per machine instruction (cycle), but sometimes an assembly instruction expands to more than one machine instruction.  Is that what&#039;s happening here---there&#039;s an extra machine instruction we&#039;re not seeing?  Or bad timing by me?  Not sure.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;I see 11 instructions in the loop, just less than my estimated 12 instructions.  &lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;&amp;lt;1-- Usually we have one assembly instruction per machine instruction (cycle), but sometimes an assembly instruction expands to more than one machine instruction.  Is that what&#039;s happening here---there&#039;s an extra machine instruction we&#039;re not seeing?  Or bad timing by me?  Not sure. --&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19895&amp;oldid=prev</id>
		<title>Lynch at 12:08, 26 January 2011</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19895&amp;oldid=prev"/>
		<updated>2011-01-26T12:08:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:08, 26 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt; 364:  0043102a  slt    v0,v0,v1            // if v0 &amp;lt; v1, set v0 to 1, otherwise to 0&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt; 364:  0043102a  slt    v0,v0,v1            // if v0 &amp;lt; v1, set v0 to 1, otherwise to 0&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt; 368:  1440ffe4  bnez   v0,2fc &amp;lt;main+0x2fc&amp;gt; // if v0 is nonzero (i.e., 10 M &amp;lt;= i), exit &quot;for&quot; loop&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt; 368:  1440ffe4  bnez   v0,2fc &amp;lt;main+0x2fc&amp;gt; // if v0 is nonzero (i.e., 10 M &amp;lt;= i), exit &quot;for&quot; loop&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt; 36c:  00000000  nop                        // no operation &lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; 36c:  00000000  nop                        // no operation&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;;&lt;/ins&gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;finish branching&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt; 370:  8fc20010  lw     v0,16(s8)           // load i into v0&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt; 370:  8fc20010  lw     v0,16(s8)           // load i into v0&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt; 374:  24420001  addiu  v0,v0,1             // (unsigned integer) add 1 to v0&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt; 374:  24420001  addiu  v0,v0,1             // (unsigned integer) add 1 to v0&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt; 378:  afc20010  sw     v0,16(s8)           // store v0 back to i&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt; 378:  afc20010  sw     v0,16(s8)           // store v0 back to i&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt; 37c:  1000fff6  b      358 &amp;lt;main+0x358&amp;gt;    // go back to start of loop, instruction 358&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt; 37c:  1000fff6  b      358 &amp;lt;main+0x358&amp;gt;    // go back to start of loop, instruction 358&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt; 380:  00000000  nop                        // no operation&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt; 380:  00000000  nop                        // no operation&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;; finish branching&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19866&amp;oldid=prev</id>
		<title>Lynch at 09:28, 26 January 2011</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19866&amp;oldid=prev"/>
		<updated>2011-01-26T09:28:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:28, 26 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;If you&#039;re interested to learn more about assembly instruction sets, you can start with [http://en.wikipedia.org/wiki/MIPS_architecture http://en.wikipedia.org/wiki/MIPS_architecture], or the [[Media:MIPSInstructionReference.pdf|MIPS Instruction Set Reference]] or [[Media:MIPS-M4K-Core.pdf|MIPS32 M4K Core Software Reference]].  If you are writing C code that needs to be very time or memory efficient, you can include assembly commands directly in your C code using &amp;lt;tt&amp;gt;asm&amp;lt;/tt&amp;gt;.  As a simple example, the line &amp;lt;tt&amp;gt;asm(&quot;nop&quot;)&amp;lt;/tt&amp;gt; will directly insert a nop in your compiled code.  We will not go into assembly in more detail.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;If you&#039;re interested to learn more about assembly instruction sets, you can start with [http://en.wikipedia.org/wiki/MIPS_architecture http://en.wikipedia.org/wiki/MIPS_architecture], or the [[Media:MIPSInstructionReference.pdf|MIPS Instruction Set Reference]] or [[Media:MIPS-M4K-Core.pdf|MIPS32 M4K Core Software Reference]].  If you are writing C code that needs to be very time or memory efficient, you can include assembly commands directly in your C code using &amp;lt;tt&amp;gt;asm&amp;lt;/tt&amp;gt;.  As a simple example, the line &amp;lt;tt&amp;gt;asm(&quot;nop&quot;)&amp;lt;/tt&amp;gt; will directly insert a nop in your compiled code.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;  (Though that specific example may not help with efficiency!)&lt;/ins&gt;  We will not go into assembly in more detail.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19865&amp;oldid=prev</id>
		<title>Lynch at 09:28, 26 January 2011</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19865&amp;oldid=prev"/>
		<updated>2011-01-26T09:28:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:28, 26 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;If you&#039;re interested to learn more about assembly instruction sets, you can start with [http://en.wikipedia.org/wiki/MIPS_architecture http://en.wikipedia.org/wiki/MIPS_architecture], or the [[Media:MIPSInstructionReference.pdf|MIPS Instruction Set Reference]] or [[Media:MIPS-M4K-Core.pdf|MIPS32 M4K Core Software Reference]].  If you are writing code that needs to be very efficient, you can include assembly commands directly in your C code using &amp;lt;tt&amp;gt;asm&amp;lt;/tt&amp;gt;.  As a simple example, the line &amp;lt;tt&amp;gt;asm(&quot;nop&quot;)&amp;lt;/tt&amp;gt; will directly insert a nop in your compiled code.  We will not go into assembly in more detail.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;If you&#039;re interested to learn more about assembly instruction sets, you can start with [http://en.wikipedia.org/wiki/MIPS_architecture http://en.wikipedia.org/wiki/MIPS_architecture], or the [[Media:MIPSInstructionReference.pdf|MIPS Instruction Set Reference]] or [[Media:MIPS-M4K-Core.pdf|MIPS32 M4K Core Software Reference]].  If you are writing&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; C&lt;/ins&gt; code that needs to be very&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; time or memory&lt;/ins&gt; efficient, you can include assembly commands directly in your C code using &amp;lt;tt&amp;gt;asm&amp;lt;/tt&amp;gt;.  As a simple example, the line &amp;lt;tt&amp;gt;asm(&quot;nop&quot;)&amp;lt;/tt&amp;gt; will directly insert a nop in your compiled code.  We will not go into assembly in more detail.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19864&amp;oldid=prev</id>
		<title>Lynch at 09:25, 26 January 2011</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19864&amp;oldid=prev"/>
		<updated>2011-01-26T09:25:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:25, 26 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;The first number in each row is the address of the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;first&lt;/del&gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;byte&lt;/del&gt; of each instruction.  The second number is the 32-bit instruction written in hexadecimal; the first several bits are for the instruction type, or &quot;opcode,&quot; and the remaining bits are to specify registers, memory locations, values, etc., used by the instruction.  The next column is the opcode in human-readable form, and the last column contains the human-readable form of the registers, memory locations, values, etc., used by the instruction.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;The first number in each row is the address of the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;instruction&lt;/ins&gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;relative to the start&lt;/ins&gt; of&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; the program at 000.  (Note that the instructions are&lt;/ins&gt; each&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; 4 bytes long, or 32 bits, so the address of each successive&lt;/ins&gt; instruction&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; is 4 bytes greater than the previous one&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/ins&gt;  The second number is the 32-bit instruction written in hexadecimal; the first several bits are for the instruction type, or &quot;opcode,&quot; and the remaining bits are to specify registers, memory locations, values, etc., used by the instruction.  The next column is the opcode in human-readable form, and the last column contains the human-readable form of the registers, memory locations, values, etc., used by the instruction.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;I see&lt;del class=&quot;diffchange diffchange-inline&quot;&gt; 10 or&lt;/del&gt; 11 instructions in the loop, just less than my estimated 12 instructions.  Usually we have one assembly instruction per machine instruction (cycle), but sometimes an assembly instruction expands to more than one machine instruction.  Is that what&#039;s happening here---there&#039;s an extra machine instruction we&#039;re not seeing?  Or bad timing by me?  Not sure.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;I see 11 instructions in the loop, just less than my estimated 12 instructions.  Usually we have one assembly instruction per machine instruction (cycle), but sometimes an assembly instruction expands to more than one machine instruction.  Is that what&#039;s happening here---there&#039;s an extra machine instruction we&#039;re not seeing?  Or bad timing by me?  Not sure.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19833&amp;oldid=prev</id>
		<title>Lynch at 16:43, 25 January 2011</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19833&amp;oldid=prev"/>
		<updated>2011-01-25T16:43:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:43, 25 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;If you&#039;re interested to learn more about assembly instruction sets, you can start with [http://en.wikipedia.org/wiki/MIPS_architecture http://en.wikipedia.org/wiki/MIPS_architecture], or the [[Media:MIPSInstructionReference.pdf|MIPS Instruction Set Reference]] or [[Media:MIPS-M4K-Core.pdf|MIPS32 M4K Core Software Reference]].  If you are writing code that needs to be very efficient, you can include assembly commands directly in your C code using &amp;lt;tt&amp;gt;asm&amp;lt;/tt&amp;gt;.  As a simple example, the line &amp;lt;tt&amp;gt;asm(&quot;nop&quot;)&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;;&lt;/del&gt;&amp;lt;/tt&amp;gt; will directly insert a nop in your compiled code.  We will not go into assembly in more detail.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;If you&#039;re interested to learn more about assembly instruction sets, you can start with [http://en.wikipedia.org/wiki/MIPS_architecture http://en.wikipedia.org/wiki/MIPS_architecture], or the [[Media:MIPSInstructionReference.pdf|MIPS Instruction Set Reference]] or [[Media:MIPS-M4K-Core.pdf|MIPS32 M4K Core Software Reference]].  If you are writing code that needs to be very efficient, you can include assembly commands directly in your C code using &amp;lt;tt&amp;gt;asm&amp;lt;/tt&amp;gt;.  As a simple example, the line &amp;lt;tt&amp;gt;asm(&quot;nop&quot;)&amp;lt;/tt&amp;gt; will directly insert a nop in your compiled code.  We will not go into assembly in more detail.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19832&amp;oldid=prev</id>
		<title>Lynch at 16:43, 25 January 2011</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19832&amp;oldid=prev"/>
		<updated>2011-01-25T16:43:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:43, 25 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;If you&#039;re interested to learn more about assembly instruction sets, you can start with [http://en.wikipedia.org/wiki/MIPS_architecture http://en.wikipedia.org/wiki/MIPS_architecture], or the [[Media:MIPSInstructionReference.pdf|MIPS Instruction Set Reference]] or [[Media:MIPS-M4K-Core.pdf|MIPS32 M4K Core Software Reference]].  If you are writing code that needs to be very efficient, you can include assembly commands directly in your C code using &amp;lt;tt&amp;gt;asm&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;t&lt;/del&gt;&amp;gt;.  As a simple example, the line &amp;lt;tt&amp;gt;asm(&quot;nop&quot;);&amp;lt;/tt&amp;gt; will directly insert a nop in your compiled code.  We will not go into assembly in more detail.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;If you&#039;re interested to learn more about assembly instruction sets, you can start with [http://en.wikipedia.org/wiki/MIPS_architecture http://en.wikipedia.org/wiki/MIPS_architecture], or the [[Media:MIPSInstructionReference.pdf|MIPS Instruction Set Reference]] or [[Media:MIPS-M4K-Core.pdf|MIPS32 M4K Core Software Reference]].  If you are writing code that needs to be very efficient, you can include assembly commands directly in your C code using &amp;lt;tt&amp;gt;asm&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tt&lt;/ins&gt;&amp;gt;.  As a simple example, the line &amp;lt;tt&amp;gt;asm(&quot;nop&quot;);&amp;lt;/tt&amp;gt; will directly insert a nop in your compiled code.  We will not go into assembly in more detail.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19831&amp;oldid=prev</id>
		<title>Lynch at 16:42, 25 January 2011</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=NU32v2:_Digital_I/O_Assembly_Code&amp;diff=19831&amp;oldid=prev"/>
		<updated>2011-01-25T16:42:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:42, 25 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Notice our use of the constant 10,000,000 in the code actually requires two assembly instructions to load the value into register v0:  one for the most significant half-word (16 bits), and one for the least significant half-word.  We have a limit of 32 bits total to specify the instruction (and some of them are used for the opcode and specifying the register).  If we created a variable and assigned it the value 10,000,000, on the other hand, the entire word could be loaded with one lw instruction.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;If you&#039;re interested to learn more about assembly instruction sets, you can start with [http://en.wikipedia.org/wiki/MIPS_architecture http://en.wikipedia.org/wiki/MIPS_architecture], or the [[Media:MIPSInstructionReference.pdf|MIPS Instruction Set Reference]] or [[Media:MIPS-M4K-Core.pdf|MIPS32 M4K Core Software Reference]], &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;but&lt;/del&gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;we&lt;/del&gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;won&#039;&lt;/del&gt;t go into assembly in more detail.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;If you&#039;re interested to learn more about assembly instruction sets, you can start with [http://en.wikipedia.org/wiki/MIPS_architecture http://en.wikipedia.org/wiki/MIPS_architecture], or the [[Media:MIPSInstructionReference.pdf|MIPS Instruction Set Reference]] or [[Media:MIPS-M4K-Core.pdf|MIPS32 M4K Core Software Reference]]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.  If you are writing code that needs to be very efficient&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;you&lt;/ins&gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;can&lt;/ins&gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;include assembly commands directly in your C code using &amp;lt;tt&amp;gt;asm&amp;lt;/&lt;/ins&gt;t&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;.  As a simple example, the line &amp;lt;tt&amp;gt;asm(&quot;nop&quot;);&amp;lt;/tt&amp;gt; will directly insert a nop in your compiled code.  We will not&lt;/ins&gt; go into assembly in more detail.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
</feed>