PLEASE WRITE THE CODE IN MIPS Hackathon Challenge Objective: Write code to displ
ID: 3726316 • Letter: P
Question
PLEASE WRITE THE CODE IN MIPS
Hackathon Challenge
Objective: Write code to display the number of days, given the month
The problem is broken into phases. Phase 1 earns up to 3 points. Phase 2 earns an additional 2 points.
Phase 1 (3 points): Implement the following program in MIPS:
In the main program:
get month from the user
if the user enters 0, exit the program
if the month is not 1-12, print an error message and repeat
print the month and number of days as shown in the sample run
Write a function to determine the number of days by implementing the switch statement shown in the box in MIPS.
Sample Phase 1 run:
Phase 2 (2 additional points): Instead of printing the number of the month, print the 3 character abbreviation as shown in this sample run:
Upload your .asm file to eLearning
Explanation / Answer
PHASE1-
PHASE 2-
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.