# board1.s Game of Life on a 1010 grid
.data
N:.word 10# gives board dimensions
board:
.byte 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
.byte 1, 1, 0, 0, 0, 0, 0, 0, 0, 0
.byte 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
.byte 0, 0, 1, 0, 1, 0, 0, 0, 0, 0
.byte 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
.byte 0, 0, 0, 0, 1, 1, 1, 0, 0, 0
.byte 0, 0, 0, 1, 0, 0, 1, 0, 0, 0
.byte 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
.byte 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
.byte 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
newBoard: .space 100
# board2.s Game of Life on a 1515 grid
.data
N:.word 15# gives board dimensions
board:
.byte 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
.byte 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0
.byte 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0
.byte 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0
.byte 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1
.byte 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0
.byte 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0
.byte 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0
.byte 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0
.byte 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0
.byte 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1
.byte 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0
.byte 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0
.byte 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0
.byte 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
newBoard: .space 225
# COMP1521 19t2 Game of Life on a NxN grid
#
# Written by <
## Requires (from `boardX.s):
# N (word): board dimensions
# board (byte[][]): initial board state
# newBoard (byte[][]): next board state
## Provides:
.globlmain
.globldecideCell
.globlneighbours
.globlcopyBackAndShow
########################################################################
# .TEXT
.text
main:
# Frame:
# Uses:
# Clobbers:
# Locals:
# Structure:
#main
#-> [prologue]
#->
#-> [epilogue]
# Code:
# Your main program code goes here.Good luck!
main__post:
jr$ra
# Put your other functions here
Reviews
There are no reviews yet.