.text .globl mymin mymin: la $t0, y # t0 = y lw $t0, 0($t0) la $t1, z # t1 = z lw $t1, 0($t1) slt $t2, $t0, $t1 # t2 = 1 if t0 < t1 otherwise t2 = 0 beqz $t2, else # if t2 = 0 then jump label else la $t2, x # x = t1 sw $t1, 0($t2) b end # jump to the end of function (skip else part) else: la $t2, x # x = t0 sw $t0, 0($t2) end: jr $ra # return
if you find any difficulty to understand this, please comment. I always here to help you
thank you.
8, 100% This MIPS/S am includes a subroutine called myadd that performs x=(y+2): . In the...
Write a MIPSzy subroutine, power, that accepts 2 arguments x and y and computes x^y . You can assume that x and y are both larger than 0. The main program passes the two parameters and receives the return value through the program stack. addi $t0, $zero, 5100 top: lw $t1, 0($t0) beq $t1, $zero, done addi $sp, $sp, -4 sw $t1, 0($sp) addi $t2, $zero,4 addi $sp, $sp, -4 sw $t2, 0($sp) addi $sp, $sp, -4 jal power lw...