# This MIPS program adds 2 numbers input # Filename : add.s # start xspim/spim/qtspim # load mips file # run #input data .data .align 2 Input: .asciiz "\nEnter two integers \n" Output: .asciiz "\n\nThe the greater number 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 Select: bge $s1,$s2,first second: move $s3, $s2 b print nop first: move $s3, $s1 print: li $v0,4 la $a0,Output syscall li $v0,1 # system call code for print int move $a0, $s3 syscall Exit: li $v0,10 # System call code for exit syscall # exit