Difference between revisions of "CSC103 Homework 4 solution 2012"

From dftwiki3
Jump to: navigation, search
(Created page with "--~~~~ ---- <code><pre> ; Solution program for optional assignment ; Spring 2012 ; D. Thiebaut start: lod-c 55 ; load 55 in AC sto var1 ; store AC in var1...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
--[[User:Thiebaut|D. Thiebaut]] 09:51, 1 March 2012 (EST)
 
--[[User:Thiebaut|D. Thiebaut]] 09:51, 1 March 2012 (EST)
 
----
 
----
 +
<onlydft>
 +
The solution program is below.  It will start by storing 55 in var1 and var2, then will increase var1 by 2 and decrease var2 by 2 until var1 contains 65 and var2 contains 45.  The program will then stop.
 +
 +
Note that in assembly language, everything that follows  a semicolon is considered a comment and is not ''translated'' into instructions by the ''translate'' process (which is called an ''assembler'', by the way).
 +
 +
Here's the code:
 
<code><pre>
 
<code><pre>
 
; Solution program for optional assignment
 
; Solution program for optional assignment
Line 44: Line 50:
 
</pre></code>
 
</pre></code>
 
<br />
 
<br />
 
+
</onlydft>
 
<br />
 
<br />
  

Latest revision as of 16:03, 1 June 2012

--D. Thiebaut 09:51, 1 March 2012 (EST)



...