Difference between revisions of "CSC231 Homework 6 2017"

From dftwiki3
Jump to: navigation, search
Line 10: Line 10:
 
==Problem Statement==
 
==Problem Statement==
 
<br />
 
<br />
Write an assembly language program similar to the one with work out in class, but with a few differences, listed below.  You can find the program we wrote in class [[CSC231_Developing_the_Game_of_Life_in_Assembly | here]].
+
Write an assembly language program called '''hw6.asm''' similar to the one with work out in class, but with a few important differences, listed below.  You can find the program we wrote in class [[CSC231_Developing_the_Game_of_Life_in_Assembly | here]].
 
<br />
 
<br />
 
* Your program will use an ''include'' file to get the array dish, which contains the initial 1-line generation of cells.   
 
* Your program will use an ''include'' file to get the array dish, which contains the initial 1-line generation of cells.   
Line 23: Line 23:
 
: That's the main program.  It contains the data section and the code section.  In the data section is a statement ''%include "dishArray.inc'' that instructs nasm to read this other file
 
: That's the main program.  It contains the data section and the code section.  In the data section is a statement ''%include "dishArray.inc'' that instructs nasm to read this other file
 
; '''dishArray.inc'''
 
; '''dishArray.inc'''
: This file contains the definition of the '''dish''' array, of the constant '''N''', and of the number of generations '''maxGen'''.
+
: This file contains the definitions of  
 +
::* the '''dish''' array,
 +
::* the constant '''N''', and  
 +
::* the number of generations '''maxGen'''.
 
<br />
 
<br />
 
===demo.asm===
 
===demo.asm===
Line 143: Line 146:
 
* You should verify that it prints the ASCII version of the '''dish''' array defined in the ''dishArray.inc'' file.
 
* You should verify that it prints the ASCII version of the '''dish''' array defined in the ''dishArray.inc'' file.
 
* For fun, modify the 0s and 1s inside the array '''dish''', in the '''dishArray.inc''' file (you may remove some, or add new 1s or 0s), and assemble, link, and run the demo program again.  You should see the new output reflect your changes.
 
* For fun, modify the 0s and 1s inside the array '''dish''', in the '''dishArray.inc''' file (you may remove some, or add new 1s or 0s), and assemble, link, and run the demo program again.  You should see the new output reflect your changes.
 +
* Similarly, change the number stored in '''maxGen''', in ''dishArray.inc'', re-assemble, link, and execute, and see how your change affects the output.
 
<br />
 
<br />
  

Revision as of 20:19, 1 April 2017

--D. Thiebaut (talk) 18:56, 1 April 2017 (EDT)


Game Of Life Without Loop Instructions


For this assignment, you need to write a game of life program in assembly, and the challenge is to implement it without using the loop instruction, using only the cmp instruction and conditional jumps.



...