### assembly

#### MIPS Assemply Language Convert using radix

```I have this code, but I have to make some changes to it.
The following MIPS code converts an unsigned integer stored in register \$a0 into a string stored in the data segment in memory. The string is initialized with 10 space characters. The string has 10 characters only because a 32-bit unsigned integer can have at most 10 digits.
.data
str: .asciiz " " # str = 10 space characters
.text
.globl main
main:
li \$a0, 5128 # \$a0 = unsigned integer to convert
addiu \$v0, \$v0, 11 # \$v0 = pointer at end of str
li \$a1, 10 # Initialize \$a1 = 10
int2str:
divu \$a0, \$a1 # divide \$a0 by 10
mflo \$a0 # \$a0 = quotient
mfhi \$t0 # \$t0 = remainder (0 to 9)
addiu \$t0, \$t0, 48 # convert digit into a character
addiu \$v0, \$v0, -1 # point to previous space character
sb \$t0, ( \$v0) # store byte: Memory(\$v0) = \$t0
bnez \$a0, int2str # loop back if quotient is not zero
done:
. . . # \$v0 = pointer to string in memory
The integer-to-string program presented above converts an unsigned integer to string format using successive division by 10 and storing the remainder digit characters in a string. It is also possible to convert the unsigned integer to any radix using successive divisions by the radix value. Rewrite the integer-to-string program asking the user to input an unsigned integer and a radix value between 2 and 10. Do the radix conversion and then print the string. Make sure that the string has sufficient space characters, especially when converting to radix```

### Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization