Create a new MASM project by following the procedure as described in the tutorial. Go to the main.asm file and copy the following code. As seen in the code block, a variable ‘num’ is declared and it holds the value ‘23’ and another variable ‘ans’ is declared, and it holds the value ‘255’. You should write a code which determines whether ‘num’ is a prime number or not. If it is a prime number, you should write ‘1’ to the variable ‘ans’ otherwise write ‘-1’ to variable ‘ans’. At the end of the program, you can verify whether your code is functioning correctly by examining the value of the variable ‘ans’.
Create a new MASM project by following the procedure as described in the tutorial. Go to the main.asm file and copy the following code. As seen in the code block, a variable ‘num’ is declared and it holds the value ‘23’ and another variable ‘ans’ is declared, and it holds the value ‘255’. You should … Read more