Question: CODED IN MIPS So I have most of the program coded, I just need help using the stack pointer in MIPS. I am confused on


CODED IN MIPS
So I have most of the program coded, I just need help using the stack pointer in MIPS. I am confused on how exactly I am supposed to access the the data in the stack to display back to the user at the end of the program.
Do NOT use jal/jr or other function/procedure calls
Here is an example, but instead with isolation: Please enter a number: 15 Would you like to shift or isolate the number (0 or 1 respectively)? 1 Enter the starting bit to isolate: 0 Enter the ending bit to isolate: 2 Result: 7 Stored. Would you like to manipulate another number ( for no, 1 for yes)? 1 Please enter a number: 31 Would you like to shift or isolate the number (0 or 1 respectively)? 1 Enter the starting bit to isolate: 0 Enter the ending bit to isolate: 2 Result: 7 Stored. Would you like to manipulate another number ( for no, 1 for yes)? 0 History: 7 7 A note on inputs: In order to verify your code, we will run it through some test cases. You do not need to do any conditional checking of inputs, as we will never give your program anything besides what is explicitly described. The exact range of the inputs is as follows: When first asking for a number, any 32 digit signed number can be expected. When asking for an operation (shift or isolate), the number 0 or 1 will be given. When asking for a shift operation, any number between 0 and 32 can be expected. When asking for a shift direction, a 0 or a 1 will be given. When asking for the starting and ending indices in the isolate operation, any number between 0 and 32 should be expected. When asking whether or not the user wants to manipulate another number, a 0 or 1 will be given. Here is an example, but instead with isolation: Please enter a number: 15 Would you like to shift or isolate the number (0 or 1 respectively)? 1 Enter the starting bit to isolate: 0 Enter the ending bit to isolate: 2 Result: 7 Stored. Would you like to manipulate another number ( for no, 1 for yes)? 1 Please enter a number: 31 Would you like to shift or isolate the number (0 or 1 respectively)? 1 Enter the starting bit to isolate: 0 Enter the ending bit to isolate: 2 Result: 7 Stored. Would you like to manipulate another number ( for no, 1 for yes)? 0 History: 7 7 A note on inputs: In order to verify your code, we will run it through some test cases. You do not need to do any conditional checking of inputs, as we will never give your program anything besides what is explicitly described. The exact range of the inputs is as follows: When first asking for a number, any 32 digit signed number can be expected. When asking for an operation (shift or isolate), the number 0 or 1 will be given. When asking for a shift operation, any number between 0 and 32 can be expected. When asking for a shift direction, a 0 or a 1 will be given. When asking for the starting and ending indices in the isolate operation, any number between 0 and 32 should be expected. When asking whether or not the user wants to manipulate another number, a 0 or 1 will be given
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
