CSC231 Homework 8 2010

From dftwiki3
Revision as of 09:44, 11 November 2010 by Thiebaut (talk | contribs) (Game of Life in 1D)
Jump to: navigation, search

--D. Thiebaut 13:36, 11 November 2010 (UTC)


Page under construction!
UnderConstruction.jpg






This homework is due Wednesday evening, 11/17/10, at midnight. You can work on this assignment in pairs.


Game of Life in 1D

Assignment 1

Watch Conway talk about the Game of Life on YouTube (Parts 1 and 2).



Assignment 2

Read the page on Conway's Game of Life on Wikipedia. Great introduction.

Assignment 3

Your assignment is simple, and you have to write a program that you may have already written in one or two different languages before: [Conway's Game of Life]. The challenge this time, is that it must be done in assembly, using functions where parameters are passed through the stack and not via registers, and you have to write it without the compare instruction that would normally be used for this purpose (I'll show you a way around it).

Details

  • Your program should be called hw8.asm
  • It should maintain the cells in a 1-dimensional array of size 70
  • Each cell can be either dead or alive. Dead cells are presented as spaces, life cells with a character of your choice.
  • You are free to choose the initial population in the array
  • The rules are simple:
    • If a cell is alive in one generation, it will be dead the next. The lifespan is finite.
    • If a cell is dead in one generation, but has only one alive neighbor, it will be alive in the next generation. This correspond to a positive birth rate under preferred population size.
  • Your program will print each generation one above the next, one line at a time.
  • Here is an example generated by the applet on Garret Wilson's page:



1DGameOfLife.png