I am trying to see if the input a user entered is 0 for the second character, for example if they enter "A0123" then the statement is true. I have managed to remove the equals sign, however when I run my program, it does not enter into the branch that is supposed to check that the 2nd character is 0.
In the register $t2 I store the users exact input (with newline character). and in $s5 I store the asciiz string "0" with a newline as well. Then I remove the first character of the user's input.
What is going wrong and how can I fix it?
.data
zero: .asciiz "0\n"
la $s5, zero
addiu $t2,$t2,1 #remove equals sign
beq $t2, $s5, zero2 #referencing 0
beq $t2, $s6, one2
j exit2
zero2:
move $t2, $t0
j exit2
nopafter any branch instruction. - Jonathon Reinhart