I am trying to see if a variable ($a2) from my main method is greater than 0. If it is greater, $v1 should become 7 and if it is less than or equal $v1 should become 10 and the function will return the respective number. When I run the code, it always return 10 no matter what. Any suggestions to what I am doing wrong?
fme:
addi $t0, $zero, 0 #setting $t0 equal to 0
bgt $a2, $t0, GREATER
ble $a2, $t0, NOTGREATER
GREATER:
addi $v1, $zero, 7
NOTGREATER:
addi $v1, $zero, 10
jr $ra