- Write In Mips Assembly Language A Well Documented Program Consisting Of The Two Following Functions Write A Function 1 (77.83 KiB) Viewed 15 times
Write in MIPS Assembly language a well-documented program consisting of the two following functions. • Write a function
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write in MIPS Assembly language a well-documented program consisting of the two following functions. • Write a function
Write in MIPS Assembly language a well-documented program consisting of the two following functions. • Write a function that accepts two parameters of type half in $a0 and $a1 registers and returns in $a3 register the value calculated as shown below. (16* $a0-8 $a1 if $a0 == $a1 $a3 = $a0 $al if $a0! = $a1 Write a function with a minimum number of instructions that: 1) defines four variables p1 and p2 of type half and initializes them with any values; 2) calls the above-defined function and prints three values: p1, p2 and the returned value separated by tabs. 3) To ensure the correctness of your program, run it twice: a) When p1 and p2 are equal b) When p1 and p2 are NOT equal Hints & Notes: • Assignments must be prepared and submitted by teams of No more than two students. Late submissions are NOT accepted. . . Print proper messages to improve the readability of the output produced by your program. Write, test, and debug the code for each part before moving to the next part. . Use simple values to verify the correctness of calculations in your program. Practice well with ALL buttons and commands to work with MARS software. Use single-step mode to watch the contents of registers and memory locations after executing each instruction.