# 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 $v0,4 # System call code for print string la $a0,Input # Argument string as Input syscall # Print the string li $v0,5 # System call code to read int input syscall # Read it move $s0,$v0 # move the num entered into $s0 li $v0,5 # System call code to read int input syscall # Read it move $s1,$v0 # move the num entered into $s1 add $s2, $s0, $s1 # add s0 and s1 and place the result in s2 Answer: li $v0,4 # System call code for print string la $a0,Output # Argument string as Input syscall # Print the string li $v0,1 # system call code for print int move $a0,$s2 # return_value as argument syscall Exit: li $v0,10 # System call code for exit syscall # exit