Question: Write a program in MIPS assembly language to compute the average of an ASCII odd number string containing only integer decimal string. You can use
Write a program in MIPS assembly language to compute the average of an ASCII
odd number string containing only integer decimal string. You can use pseudo
instructions. Your program should expect register $a to hold the address of a
nullterminated string containing some combination of the digits through Your
program should compute the sum of the even integer value equivalent to each digit
in the string, then place this number in register $v If a nondigit character
appears anywhere in the string, your program should stop with the value in
register $v For example, if register $a points to a sequence of three bytes ten,
ten, ten, ten the null terminated string then when the program stops,
register $v should contain the value of which is computed as
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
