Professional Documents
Culture Documents
An Assembly Language Program To Find The Square Root of A Number Using 8085
An Assembly Language Program To Find The Square Root of A Number Using 8085
Algorithm
1) Load the HL pair with the address of the number whose square root is to be found.
2) Copy the number to accumulator.
3) Initialize E with 0.
4) Subtract content of E from accumulator.
5) Increment register E by 2.
6) Increment content C register by 1.
7) Compare accumulator content with 0.
8) If accumulator content is not zero then go to step 4 else go to step 9.
9) Store the square root in to the memory.
10) Terminate the program.
Program
Observation