DOC PREVIEW
UIUC ECE 190 - Machine Problem 3

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1 ECE 190 Spring 2011 Machine Problem 3 MP3.1 Due: 5 p.m., Wednesday March 9th, 2011 MP3.2 Due: 5 p.m., Friday March 18th, 2011 Problem Statement For this machine problem, you will be writing a program in the LC-3 assembly language that implements Conway’s “Game of Life.” A detailed description of “Life” can be found at: http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life Your program will be responsible for evaluating a fixed-size 16x16 “life board” consisting of 256 individual cells each held in memory in row-major order. Row-major order implies that the game board data for first row is stored first, followed by the second row, and so on. The final assembly program will read in the board starting at memory address x5000 and from there a user will be able to clear, configure, or “run” the board through a single iteration of “Life.” For MP3.1 you are required to implement subroutines that clear, setup, and display the board as well as implement all the keyboard and display I/O subroutines. For MP3.2 you are required to implement the “Life” algorithm that applies the game rules to each cell of the board. There is a great amount of detail to testing and implementing this MP. Be sure to read the ENTIRE document, SEVERAL TIMES, to make sure you have a full understanding of the MP prior to coding. Hand In Because of the complexity (and error prone process) of turning in multiple files, “make handin-3.1” and “make handin-3.2” commands have been provided (thanks to the Makefile!) that will turn in all of your code. If you wish to handin only a specific file you can do so by typing “handin --MP 3.1 <file>” or “handin --MP 3.2 <file>”. You may hand in as many times as you like, but only the last submission will be graded. You can use the “verify --MP 3.1 <file>” and “verify --MP 3.2 <file>” commands to view any of the files already submitted.2 Game of Life The “Life” board used in this MP is a 16x16 board (256 total cells) that is stored in row-major order starting at memory address x5000. (Hint: Additional space is available starting at memory address x6000 that you can use as temporary storage place to hold another copy of the board, if needed.) Each memory location represents one cell where an x0000 represents a dead cell and an x0001 represents a live cell. Other states shall not exist (x0002-xFFFF) and you are not required to handle them. When displaying the board on the terminal, each live cell will be represented by the pound (‘#’) character and each dead cell represented by a period (‘.’) character. Any two cells are neighbors if they share a border, and each cell has eight neighbors. For example, the live cell that is highlighted in red in the picture below has eight live neighbors that are all highlighted in green. Each cell has an (X,Y) coordinate where the top left corner of the board has coordinate (0,0). The board “wraps around” in the sense that each cell has eight neighbors regardless of where it is located. For instance the cell at (15,1) has neighbors to the NE, E, and SE with coordinates of (0,0), (0,1), and (0,2). (0,0) (15,0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # # # . . . . . . . . . . . . . # # # . . . . . . . . . . . . . # # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (0,15) (15,15) Initial State (0,0) (15,0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . # . # . . . . . . . . . . . . # . . . # . . . . . . . . . . . . # . # . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (0,15) (15,15) After One Generation When iterating through the “Life” game, each cell lives or dies depending on the following rules, all of which are shown in the above example: 1. Any live cell with fewer than two live neighbors dies. 2. Any live cell with two or three neighbors continues to live on. 3. Any live cell with more than three live neighbors dies. 4. Any dead cell with exactly three live neighbors is resurrected.3 Required Decomposition For this MP it is required to decompose the problem as outlined. Also note that each subroutine must be contained in a different assembly source code file. For example, the PRINT_BOARD subroutine must be placed in the assembly file print.asm. In order to make partial credit grading and unit testing possible, each subroutine is required to use specific registers for input and output data. Registers not used …


View Full Document
Download Machine Problem 3
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Machine Problem 3 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Machine Problem 3 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?