MIPS32, global variable being overwritten
In the following code, at the instructions:
MIPS Infinite Loop using Keyboard and Display MMIO Simulator
Hi this is my first post here. I am making a maze game in mips that uses bitmap display and the Keyboard and Display MMIO Simulator for movement. I created my function that accepts the characters WASD and when I press any movement key the character moves infinitely in the direction I input. For example, pressing W once causes my character to keep moving right until my MARS crashes. I only want it to move once and then wait for a new input. Attached below is the code I am trying to debug. If possible I want to implement the jr $ra register into my code. Thanks
MIPS program runs into error when loading from vector
.data normal: .ascii “aaa/0aab/0aac/0” save: .text main: # Load address of the string “aaa/0aab/0aac/0” into $a1 la $a1, normal # Skip the first string “aaa/” (4bytes) addi $a1, $a1, 4 # Load the second string “aab/0” into $a0 lw $a0, ($a1) # Store the second string at the address of “save” sw $a0, save # […]