I am trying to get input from a user in form of a string in MIPS.
There are two things I want this to do getting input, error checking for if the string is not equal to what I want.
Essentially what my idea here is that I want to grab the input and then check to see if the input is equal to any of the letters from A-P. If it is not equal to those, If it is not equal I want to have it loop until the user enters a value that is equal to these
Things that I have tried to consider using are beq or Branch if equal to. I cannot figure out how I would go about using this for comparing strings vs ints like you would traditionally.
Below is the code that I am trying to implement, this is obviously not right. But I wanted to give you guys an opportunity to see what I am trying to do so you can possibly give me some kind of direction to head towards solving this issue.
getGridInput
li $v0, 8 #This read input for string
la $a0, getGridPrompt
syscall
#if input is not equal to a-p, then jal getGridInput
beq $a0, "a", getCellInput
beq $a0, "b", getCellInput
beq $a0, "c", getCellInput
beq $a0, "d", getCellInput
beq $a0, "e", getCellInput
beq $a0, "f", getCellInput
beq $a0, "g", getCellInput
beq $a0, "h", getCellInput
beq $a0, "i", getCellInput
beq $a0, "j", getCellInput
beq $a0, "k", getCellInput
beq $a0, "l", getCellInput
beq $a0, "m", getCellInput
beq $a0, "n", getCellInput
beq $a0, "o", getCellInput
beq $a0, "p", getCellInput
jal gelGridInput