.text # function max max: # check if a0 is less than a1 slt $v0, $a0, $a1 beq $v0, $zero, a0isbigger addi $v0, $a1, 0 j max_return a0isbigger: addi $v0, $a0, 0 max_return: jr $ra #------------------------------- # M a i n p r o g r a m #------------------------------- main: # read two integers from the user and print the maximum # read first integer and put in a0 for # call to max li $v0, 5 syscall addi $a0, $v0, 0 # store v0 into t0 # read second integer and put in a1 for call to max li $v0, 5 syscall addi $a1, $v0, 0 # put v0 in a1 jal max #put result of max into a0 for syscall to print_int addi $a0, $v0, 0 # get function result out of $v0 li $v0, 1 syscall # Yow! Something bad is going to happen here! What is it? jr $ra