Combining charcters in mips

i was wondering if there was anyway of combining two characters to form one character. For instance, i have the character 6 and 7 , i want to combine them and make the result 67 that is saved in a register, is there any solution to this problem ?

//Thx in advance

Answers


Do you mean you want to store the numerical value of a string of digit characters?

If so, you can take each character's ASCII value (perform the necessary checking to make sure it's in the appropriate range), subtract the value of '0' from it, multiply it by 10 to the power of its position (numbered in reverse order, starting from 0) and then add it to a total value.

For example:

"67" -> 54, 55 -> (54-48)*10^1, (55-48)*10^0 -> (6*10)+(7*1) = 67

Need Your Help

Can't update Android Studio - only download

android intellij-idea android-studio updates

I have not updated my Android Studio for a while and am presented with this dialog box when trying to update: