Question: Please code in x86 assembly language Write a procedure named CheckPrime that sets the EBX register to 1 if the 32-bit integer passed in the
Please code in x86 assembly language
Write a procedure named CheckPrime that sets the EBX register to 1 if the 32-bit integer passed in the EAX register is prime. If the 32-bit integer passed in the EAX register is not prime, then the procedure should set EBX to 0. Use the div instruction and a loop to determine if the user entered integer is prime by examining the div instructions remainder value.
Write a test program that prompts the user for an integer, calls CheckPrime, and displays a message indicating whether or not the user entered value is prime.
Submit your code (.asm file) that you have written, debugged and tested to this dropbox.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
