# This MIPS program adds 2 numbers input # Filename : add.s # start xspim/spim/qtspim # load mips file # run #input data .data .align 2 String: .space 16 Input: .asciiz "\nEnter two integers" Output: .asciiz "\n\nThe Sum of numbers entered is " .text .globl main main: li $2,4 # System call code for print string la $4,Input # Argument string as Input syscall # Print the string li $2,5 # System call code to read int input syscall # Read it move $16,$2 # move the num entered into $16 li $2,5 # System call code to read int input syscall # Read it move $17,$2 # move the num entered into $16 add $18, $16, $17 Answer: li $2,4 # System call code for print string la $4,Output # Argument string as Input syscall # Print the string li $2,1 # system call code for print int move $4,$18 # return_value as argument syscall Exit: li $2,10 # System call code for exit syscall # exit