Question: Program I - 6AP mod 17 Compute the result (R) of 6 to the power of P modulo 17: 6 mod 17 Input Output: (assuming

Program I - "6AP mod 17" Compute the result (R) of "6 to the power of P modulo 17": 6 mod 17 Input Output: (assuming the "compact" memory configuration from MARS-> Setting) The value of P is given in data memory location 0x2000 The result (R) should be written back in memory at location 0x2004 See below for an example: . data P: .word 8 R: .word -1 # R will be stored here .text # Your code goes here Levels of completiorn: (80% grade) Your code should work correctly for P E [1,12]. (100% grade) Your code should work correctly for P E [1,1200] up to 10% extra credit will be given for well commented code style and low DIC (dynamical instruction count - see Tools-> Instruction Statistics: Total) 1) 2) Answer the following questions in your report: 1) Which level does your program 1 achieve? 2) Provide screenshots of your program's result, with total instruction count, for the following three cases: (if you achieved level 1): show the results for P 5, 8, 11 (if you achieved level 2): show the results for P- 8, 201, 1005 3) How does your program compute the result of 6P mod 17? 4) List all the instructions and registers that your program uses. Program I - "6AP mod 17" Compute the result (R) of "6 to the power of P modulo 17": 6 mod 17 Input Output: (assuming the "compact" memory configuration from MARS-> Setting) The value of P is given in data memory location 0x2000 The result (R) should be written back in memory at location 0x2004 See below for an example: . data P: .word 8 R: .word -1 # R will be stored here .text # Your code goes here Levels of completiorn: (80% grade) Your code should work correctly for P E [1,12]. (100% grade) Your code should work correctly for P E [1,1200] up to 10% extra credit will be given for well commented code style and low DIC (dynamical instruction count - see Tools-> Instruction Statistics: Total) 1) 2) Answer the following questions in your report: 1) Which level does your program 1 achieve? 2) Provide screenshots of your program's result, with total instruction count, for the following three cases: (if you achieved level 1): show the results for P 5, 8, 11 (if you achieved level 2): show the results for P- 8, 201, 1005 3) How does your program compute the result of 6P mod 17? 4) List all the instructions and registers that your program uses
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
