#Application 5 .text 0x00400000 #Code section #Read the first number li $v0,5 #Load the function number syscall #Function call move $t1,$v0 #Load the first number in $t1 #Read the second number li $v0,5 #Load the function number syscall #Function call move $t2,$v0 #Load the first number in $t2 #Read the third number li $v0,5 #Load the function number syscall #Function call move $t3,$v0 #Load the first number in $t3 #Calculation of X3=(3*A)+(B*C) mul $t0,$t1,3 #$t0=$t1*3, (A*3) mul $t4,$t2,$t3 #$t4=$t2*$t3, (B*C) add $t0,$t0,$t4 #$t0=$t0+$t4, (Α*3)+(Β*C) #Convert to ASCII the first (one digit) #number (A) and store the result #in the memory (inside message) li $t5,6 #Deviation from the message #starting address add $t1,$t1,48 #Convert to ASCII code sb $t1,m1($t5) #Store the ASCII code in m1+$t5 (m1+6) add $t5,$t5,4 #Deviation from the message start add $t2,$t2,48 #Convert to ASCII code sb $t2,m1($t5) #Store the ASCII code in m1+$t5 (m1+6+4) add $t5,$t5,2 #Deviation from the message start add $t3,$t3,48 #Convert to ASCII code sb $t3,m1($t5) #Store the ASCII #code in m1+$t5 (m1+6+4+2) #Display the final message li $v0,4 #Load the function number la $a0,m1 #Load the message starting address syscall #Function call #Display result li $v0,1 #Load the function number move $a0,$t0 #Load the result to be displayed syscall #Function call #Program termination li $v0,10 #Load the function number syscall #Function call .data #Data section m1: .asciiz "x3=(3*X)+(X*X)="