To convert an ASCII number string including positive and negative integer decimal strings to an integer, write a program in MIPS assembly code. The address of a null-terminated string comprising some combination of the numbers 0 through 9 should be held in register $aO by your application. Your application should calculate the integer value that corresponds to this string of digits and save it in register $v0. If a non-digit character occurs anywhere in the string, your application should exit with register $v0 set to value-1. For example, if register $a0 refers to a three-byte sequence of 50ten, 52ten, and 0ten (null-terminated string "24"). The value 24ten should be in register $v0 after the program exits.
To convert an ASCII number string including positive and negative integer decimal strings to an integer, write a program in MIPS assembly code. The address of a null-terminated string comprising some combination of the numbers 0 through 9 should be held in register $aO by your application. Your application should calculate the integer value that corresponds to this string of digits and save it in register $v0. If a non-digit character occurs anywhere in the string, your application should exit with register $v0 set to value-1. For example, if register $a0 refers to a three-byte sequence of 50ten, 52ten, and 0ten (null-terminated string "24"). The value 24ten should be in register $v0 after the program exits.

Trending now
This is a popular solution!
Step by step
Solved in 2 steps









