#Application 4 .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 #Calculate 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) #Display the message "x3=(3*" li $v0,4 #Load the function number la $a0,m1 #Load the message starting address syscall #Function call #Display the first number li $v0,1 #Load the function number move $a0,$t1 #Load the first number to be displayed syscall #Function call #Display the message ")+(" li $v0,4 #Load the function number la $a0,m2 #Load the message starting address syscall #Function call #Display the second number li $v0,1 #Load the function number move $a0,$t2 #Load the second number to be displayed syscall #Function call #Display the message "*" li $v0,4 #Load the function number la $a0,m3 #Load the message starting address syscall #Function call #Display the third number li $v0,1 #Load the function number move $a0,$t3 #Load the third number to be displayed syscall #Function call #Display the message ")=" li $v0,4 #Load the function number la $a0,m4 #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*" m2: .asciiz ")+(" m3: .asciiz "*" m4: .asciiz ")="