(Solved):
Write a program in MIPS assembly language to compute the summation of an ASCII even number ...
Write a program in MIPS assembly language to compute the summation of an ASCII even number string containing only integer decimal string. You can use pseudo instructions. Your program should expect register \( \$ a 0 \) to hold the address of a null-terminated string containing some combination of the digits 0 through 9. Your program should compute the sum of the even integer value equivalent to each digit in the string, then place this number in register \$v0. If a non-digit character appears anywhere in the string, your program should stop with the value \( -1 \) in register \( \$ v 0 \). For example, if register \( \$ a 0 \) points to a sequence of three bytes 50 ten \( 53_{\text {ten }}, 52_{\text {ten, }} \) 0 (then null terminated string " 254 "), then when the program stops, register \( \$ v 0 \) should contain the value of 6 , which is computed as \( 2+4 \).