#####################################################################
#
# CSC258H5S Winter 2020 Assembly Programming Project
# University of Toronto Mississauga
#
#
# Bitmap Display Configuration:
# – Unit width in pixels: 8
# – Unit height in pixels: 8
# – Display width in pixels: 256
# – Display height in pixels: 256
# – Base Address for Display: 0x10008000 ($gp)
#
# Which milestone is reached in this submission?
# (See the assignment handout for descriptions of the milestones)
# – Milestone 1/2/3/4/5 (choose the one the applies)
eature 12: Background color fading from day to night back to day as game progress
, 18, ELSE
sw $t3, 0($t0)
sw $t3, 4($t0)
sw $t3, 8($t0)
sw $t3, 12($t0)
ELSE: addi $t4, $t4, 1 # i+= 1
addi $t0, $t0, 128 # t0 addtress add to 128
j LOOPSTART
BIRD: lw $t0, displayAddress
lw $t7, 0xffff0000 #t7 is 0xffff0000
lw $t9, 0xffff0004
beq $t7, 0, NOEVENT
bne $t9, 102, NOEVENT #t9 is 0xffff0004
HASEVENT: addi $t8, $t8, -128
j DRAWBIRD
NOEVENT: addi $t8, $t8, 128
DRAWBIRD: add $t0, $t0, $t8 #t8 is a buffer that keeps decreasing or increasing
lw $t4, 0($t0)
beq $t4, $t3, GAME_OVER
sw $t1, 0($t0)
lw $t4, -128($t0)
beq $t4, $t3, GAME_OVER
sw $t1, -128($t0)
lw $t4, 128($t0)
beq $t4, $t3, GAME_OVER
sw $t1, 128($t0)
lw $t4, 4($t0)
beq $t4, $t3, GAME_OVER
sw $t1, 4($t0)
lw $t4, 8($t0)
beq $t4, $t3, GAME_OVER
sw $t1, 8($t0)
lw $t4, -120($t0)
beq $t4, $t3, GAME_OVER
sw $t1, -120($t0)
lw $t4, 136($t0)
beq $t4, $t3, GAME_OVER
sw $t1, 136($t0)