 .globl main

.data
input:    		.asciiz "input_1.txt"
buffer:         	.space 4096

rows:    		.word 16  # The mount of rows of pixels
columns: 		.word 32  # The mount of columns of pixels

dead_cell: 		.byte '0'  # Character of a dead cell
alive_cell: 		.byte '1'  # Character of an alive cell
new_line: 		.byte '\n' # Character of newline
reverse_argument: 	.byte 'r'  # Character of the reverse argument

color_dead_cell:   	.word 0x005F5F5F   # Color used for dead cells (near black)
color_alive_cell:    	.word 0x00FFFFFF    # Color used for alive cells (white)

.text

# Update de cellen op basis van de regels
update:

	# Jump back to origin
 	jr $ra
	
main:

	game_loop:
	
		jal update
	
		# Sleep
		li $a0, 100 # ca. 10 FPS
		li $v0, 32
		syscall
		
		j game_loop
		
# Exit the program
exit:
	li $v0, 10    
	syscall
