#enter a string and show it
.data
prompt: .asciiz "enter a string >"
input_str: .space 81
input_sz: .word 80
.text
main:
# display the prompt
li $v0, 4
la $a0, prompt
syscall
# type a string, and save the input
li $v0, 8 # store the string in $v0
la $a0, input_str
lw $a1, input_sz
syscall
# display the inputted string
li $v0, 4
la $a0, input_str
syscall
#terminate the program
li $v0, 10
syscall