p0 emulating divu with mips instructions 2
Programming assignment 0
Using the provided framework .asm file (divu-student.asm, linked via canvas modules) and the MARS MIPS simulator (linked under support documentation), you will implement the body of a function, in MIPS, that provides the same functionality as the DIVU instruction, i.e. computing both the quotient and remainder for unsigned integer division, without using the DIVU instruction itself.
Use the provided slides in the week 5 deck on how to perform unsigned binary division as a guide to implementing your solution. You are free to consult any third party reference on how to perform general binary unsigned division, but you must write (and provide comments for) your own MIPS code solution within the provided framework.
Your code must work within MARS. Links to the MARS documentation and a link to the MARS JAR file itself are available in the Supporting Documentation module. The provided framework will print the results of both the DIVU instruction and your emulated DIVU behavior to the MARS console, so you can directly check if your solution works.
To turn in:
1 File: Your modified divu-student.asm : Please read the comments within the file for what you are required to modify and what you are forbidden from modifying in the framework code.
This assignment is not intended to be particularly difficult (a fairly direct translation of the flowchart from the slides into MIPS instructions is an efficient solution, and the recitation on Friday will cover one way to emulate a 64-bit register with 32-bit registers) — it is, however, intended to force you to use the MARS simulator and write some MIPS assembly code. Please consider starting on this assignment early enough to encounter any issues that you have in using the tools in time to receive assistance.
MARS websit:http://courses.missouristate.edu/KenVollmar/MARS/