#Application 9 .text 0x00400000 #Code section #Display the message "N=" li $v0,4 #Load the function number la $a0,dose #Load the message starting address syscall #Function call #Read number (number of lines) li $v0,5 #Load the function number syscall #Function call move $t1,$v0 #Load number in $t1 li $t3,1 #Initialize line counter again: li $t2,1 #Initialize asterisks counter again2: #Display an asterisk li $v0,4 #Load the function number la $a0,asteri #Load the message starting address syscall #Function call add $t2,$t2,1 #Update asterisk counter ble $t2,$t3,again2 #While all the asterisks have not #been displayed, go to again2 #New line li $v0,4 #Load the function number la $a0,line #Load the message starting address syscall #Function call add $t3,$t3,1 #Update line counter ble $t3,$t1,again #While all the lines have not #been displayed, go to again #Program termination li $v0,10 #Load the function number syscall #Function call .data #Data section dose: .asciiz "N=" asteri: .asciiz "*" line: .asciiz "\n"