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 intMaxint 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 a a and a
The method return value must be placed in register v
Any method must end with the instruction jr $ra
Use the literal value for true and 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 intMaxascending runintMax; Assert.assertEquals getv; Write more tests! end class
branchesintMax.asm
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
