Difference between revisions of "CSC231 Homework 6 2017"

From dftwiki3
Jump to: navigation, search
Line 131: Line 131:
 
* '''N''' is a nasm constant that is equal to the number of bytes (or cells) in '''dish'''.
 
* '''N''' is a nasm constant that is equal to the number of bytes (or cells) in '''dish'''.
 
* '''maxGen''' is the maximum number of generations your program should output.  Since the program prints the initial generation of cells plus '''maxGen''' generations, the total number of lines your program will output should be equal to '''maxGen + 1'''.
 
* '''maxGen''' is the maximum number of generations your program should output.  Since the program prints the initial generation of cells plus '''maxGen''' generations, the total number of lines your program will output should be equal to '''maxGen + 1'''.
 
+
<font color="magenta">Note that in the Game of Life program we generated in class together, I used 20 as the number of generations.  In your new version, you shouldn't use a constant, but rather whatever number is in the int variable '''maxGen'''.
 
+
<br />
 +
==Running the Demo Program==
 +
<br />
 +
 +
  231b@aurora ~ $ '''nasm -f elf demo.asm'''
 +
  231b@aurora ~ $ '''ld -melf_i386 demo.o -o demo'''
 +
  231b@aurora ~ $ '''./demo'''
 +
  !              ! ! ! ! ! ! ! !                !
 +
 +
<br />
  
 
</onlydft>
 
</onlydft>

Revision as of 20:14, 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.



...