Of course you need $a0 to be the address of the buffer
An $a1 to be the maximum number of characters to read (buffer size - 1) as a terminator is written!
Since the data is in $a0 you will need to do a load byte (LB) with 0 offset for each byte until you encounter the terminator.
lb $t2,0($t1) # c = ary[ 0 ]
beq $zero,$t2, Done # Terminator?
addi $t1,$t1,1 # inc ary base ary += 1
# do your compares here
# Value has to be in a register for a register to register compare