Currently in $t0, there is an asciiz string however this string consists of only numeric characters, and I would like this to be stored as an integer so I can add a number to it. However the method I am trying does not seem to work.
I load the users input into $a0, then move that address to $t0, and then chop off a character, then I try using andi to mask the first four bits, but this gives a memory address out of bounds error, any suggestions?
EDIT:
now the code only prints out the first integer. Which is not what I want. I am trying to get the entire integer to be printed.
li $v0, 8 #read a string into a0
la $a0, input1
move $t0, $a0
syscall
addiu $t0,$t0,1
li $t1, 5
andi $t0,$t0,0x0F
#print int in t0
move $a0, $t0
li $v0, 1
syscall
Code that parses a string entered by the user and convert into an integer.