Hi I would like to allow hello world to be outputted the number of times which the user has input , like if they wrote 3 , then hello world would be printed 3 times. How do I do this? This is what I am working with so far :
.data
n: .space 4
msg: .asciiz "Hello World"
prom1: .asciiz "How many Hello World want to be printed: "
mychar1:.byte 'a'
out_string: .asciiz "\nHello World\n"
.text
main: li $v0, 4
la $a0, msg
syscall
li $v0, 4 # print str
la $a0, nl # at nl
syscall
li $v0, 4 # print str
la $a0, prom1 # at prom1
syscall
li $v0, 5 # read int
syscall
sw $v0, n # store the user input in n
li $v0, 4 # print str
lw $t0, n
mul $t0, $a0, 1
la $a0, out_string # at out_string
syscall