Question: Step 1 : Please write a MIPS program to prompt the user to input a integer number N ( N > = 2 5 )

Step1: Please write a MIPS program to prompt the user to input a integer number N (N >=25) from the console. Then check whether the input number N is legal or not. If N is 0 or negative number or any positive number less then 25, it is regarded as illegal and your program should display an error message saying "Illegal Number!" and prompt the user to input another integer number N again. Keep doing this until the user input a legal number N (i.e., a positive integer >=25).
Step 2: With the legal number N above from Step 1, please print the first N numbers in the Fibonacci sequence in which each number is the sum of the two preceding ones, starting from 0 and 1. Note that each number in the Fibonacci sequence should be calculated using MIPS instructions. After that please run your MIPS program using SPIM software to display the result in the output (console) window. Please make sure your program is complete and runs correctly under SPIM software.

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!