Difference between revisions of "CSC231 Homework 6 2017"
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, | + | : This file contains the definition of the '''dish''' array, of the constant '''N''', and of the number of generations '''maxGen'''. |
<br /> | <br /> | ||
===demo.asm=== | ===demo.asm=== | ||
Line 128: | Line 128: | ||
</source> | </source> | ||
<br /> | <br /> | ||
− | + | * The variables '''padding0''' and '''padding1''' are extra 0 bytes around the array dish. They will always be there around the array, and if you can make use of them in your program, please do so. Otherwise, please ignore them. | |
− | + | * '''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'''. | ||
Revision as of 20:10, 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.