hi i need to make a program in assembly mips that checks if a letter exist in one string any ideas?
Use of the SI register and the LODSB command would be a great place to start.
By letter, I assume you already know the letter that you are looking for?
I wrote a small sample for you in NASM, it uses the letter L as the letter to search for.
jmp main string1 db "lookingL for a letter",0 main: mov si,string1 findletter: lodsb ;Get current char in SI, place it in AX, then advance one position cmp al,'L' ;Is the letter L? je done ;If it was, we're done or al,al ;Check flags jz not_found ;If zero flag was set, the letter was not found jmp findletter ;Loop done: ;Jumps here if letter was found not_found: ;Jumps here if letter was not found..