3 Programming Exercises • Implement a MIPS assembly function named test-prime that receives an integer as input argument
Posted: Thu May 05, 2022 12:51 pm
3 Programming Exercises • Implement a MIPS assembly function named test-prime that receives an integer as input argument in register $a0 and returns a 1 in $v0 if the number is a prime number, and 0 otherwise. The following skeleton code could help you as a starting point: main: li $a0, 0x3 jal test_prime test_prime: jr $ra • Call the function test prime from the main function in order to store the first 100 prime numbers in the data segment of the mips simulator starting from memory location 0x10010000. When you finish, show your lab demonstrator completion of this exercise.