3 Programming Exercises • Implement a MIPS assembly function named test-prime that receives an integer as input argument
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
3 Programming Exercises • Implement a MIPS assembly function named test-prime that receives an integer as input argument
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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!