Question: *MUST BE IN MIPS LANGUAGE* Write an assembly program to print out a series of numbers. First input a number N for the size of
*MUST BE IN MIPS LANGUAGE*
Write an assembly program to print out a series of numbers. First input a number N for the size of the list. This should not be more than 20. Next, you need to calculate F(i) for each number 0..N. This means you should print out F(0), F(1), , F(N-1) for a total of N numbers including the zeroth number. Your series is defined as follows:
F(0) = 1
F(1) = 3
F(i) = F(i-1) + F(i-2) + 1
the program should exit if the value entered for N is 0, otherwise the program should run again.
So the following would be a sample program output:
Please enter a value for N: 7 1 3 5 9 15 25 41
Please enter a value for N: 6 1 3 5 9 15 25
Please enter a value for N: 0
Done!
NOTE: You must use the syscall convention. For instance to print a string: la $a0,stringaddr syscall $print_string
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
