i am working on a class project and what i wan to do, is ask theuserfor 2 integers, when prompted by the message"please enter an integer:" and alsoto enter a character when the message"please enter an operator(+, *, -, /)" pops up. can someone pleaselook at this code and tell me what i am doing wrong? the first instruction prints but i get an erro message with the character input.
really appreciate it
.data
prompt: .asciiz "Please enter an integer\n"
message: .asciiz "Please enter an operator (+, - , * , / ):"
usercharacter: .space 2
.text
.globl main
main:
li $v0, 4 #system call code for printing a string is 4
la $a0, prompt #adress of string is argument 0, to print string
syscall # telling the system to execute the action
li $v0, 5 # system call for reading and displaying input
syscall
move $t1, $v0 # store input one into register $a1
li $a0, message
li $v0, 4
syscall
la $a0,usercharacter
li $a1, 2 #allocating a space for 2 caracters
li $v0 12
syscall
li $v0, 4 #system call code for printing a string is 4
la $a0, prompt #adress of string is argument 0, to print string
syscall # telling the system to execute the action
li $v0, 5 # system call for reading and displaying input
syscall
move $t2,$v0 #print the prompt message for the user to input
li,$v0,10
syscall