Logo 
Search:

Assembly Language Article

Submit Article
Comments on Program to check whether the number inputted is prime or not

A Program to check whether the number inputted is prime or not.


Amay Mao
Amay Mao from United StatesMar 20
how can I write an 8051 assembly language program that determines if a number is prime or not.

I have to do :
o Input value is stored in R0 (you can just type it in from within the simulator or do a mov
command
o Output value is a 1 stored in R0 if the input value was prime, a 0 stored in R0 if the input
value was not prime
o Provide comments in the source file that describe how you tested your program for
correct operation and describe the results of those tests
o Turn in printed source code
Rifat Hasan
Rifat Hasan from BangladeshDec 08
very very nice &logical


Please enter your Comment
  • Comment should be atleast 15 Characters.
  • Please put code inside [Code] your code [/Code].