Question: Branching in assembly - intMax Write the intMax ( int a , int b , int c ) function from CodingBat in MIPS assembly. This

Branching in assembly - intMax
Write the intMax(int a, int b, int c) function from CodingBat in MIPS assembly.
This problem focuses on writing assembly code with branches. In order for your solution to be graded, it must work with my MUnit tests. Follow these rules:
Give your procedures the exact names indicated here.
Your procedures must be declared .globl.
The method parameters will be placed in registers a0, a1, and a2.
The method return value must be placed in register v0.
Any method must end with the instruction jr $ra.
Use the literal value 1 for true and 0 for false.
The Help menu in MARS has a list of instructions, or you may find it helpful to find a set on Google, such as this MIPS instruction reference.
You may use this class, as a starting point for your MUnit tests. this class down below import org.junit.*; import static edu.gvsu.mipsunit.munit.MUnit.Register.*; import static edu.gvsu.mipsunit.munit.MUnit.*; public class IntMaxTest {/******************************************************************** Test intMax ******************************************************************/ @Test public void intMax_ascending(){ run("intMax",5,6,7); Assert.assertEquals(7, get(v0)); }// Write more tests! }// end class
branches-intMax.asm ??

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!