answersLogoWhite

0


Best Answer

MVI C,01h
MVI E,01h
MVI A,09h
LABEL:
SBB C
JZ LABEL1
INR C
INR C
INR E
JMP LABEL
LABEL1:MOV A,E
HLT

jus change the value of A in the 3rd line according to whtever number u wish to square rrot..haffun!

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

10y ago

Source Program:

LDA 4200H : Get the given data(Y) in A register

MOV B,A : Save the data in B register

MVI C,02H : Call the divisor(02H) in C register

CALL DIV : Call division subroutine to get initial value(X) in D-reg

REP: MOV E,D : Save the initial value in E-reg

MOV A,B : Get the dividend(Y) in A-reg

MOV C,D : Get the divisor(X) in C-reg

CALL DIV : Call division subroutine to get initial value(Y/X) in D-reg

MOV A, D : Move Y/X in A-reg

ADD E : Get the((Y/X) + X) in A-reg

MVI C, 02H : Get the divisor(02H) in C-reg

CALL DIV : Call division subroutine to get ((Y/X) + X)/2 in D-reg.This is XNEW

MOV A, E : Get Xin A-reg

CMP D : Compare X and XNEW

JNZ REP : If XNEW is not equal to X, then repeat

STA 4201H : Save the square root in memory

HLT : Terminate program execution

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

It is same as findig square root.Do the division once more.......

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Compute the square root of n using 8085 microprocessors?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why 8085 named so?

it is the standard usded by the INTEL to categorize their microprocessors.


What is the instruction for exit in 8085 microprocessors?

There is no exit instruction in the 8085. Do you mean return, as in from a function or interrupt? If so, the instruction is RET.


What are 10 microprocessors?

Ten microprocessors are the 4004, 4040, 8008, 8080, 8085, 8086, 8088, 80286, 80386, and 80486.There are many more, and this list only included some of the Intel microprocessors, in mostly historical order.


What are the examples of microprocessors?

E.g. 8085, 8086, 8255, 8051, 6800, 8257, 8251 and many more...


Main difference between 8085 and 8086?

The most significant difference between the Intel 8085 and 8086 microprocessors is that the 8085 is an 8-bit system and the 8086 is a 16-bit system. This difference allows the 8086 system to have a much larger set of operational instructions and can make calculations to more significant places. Note: the 8085 processor does have two 16-bit registers. The pointer and the program counter.


How do you build 8085 using vhdl?

VHDL is a hardware description language. It describes the functionality of a hardware as a program. If we know the architecture of 8085, the same can be implemented or coded using VHDL.


Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.


To find LCM of n numbers using 8085 programs?

sample program in sum of the series using the formula for s=n/2[2a+{n-1}d] in 8085


What is Difference between 8155 and 8255 microprocessor?

Neither the 8155 nor the 8255 are considered to be microprocessors. The 8155 is an integrated RAM, IO, and Timer device designed for the 8085. The 8255 is an Programmable IO controller.


What is the evolution of Intel computer?

It starts with the 4004 chipset (4 bit) and 8008 microprocessor (8 bit). The successor of the 4004 was the 4040, but this architecture was a dead end. The successors of the 8008 were the 8080, 8085, 8086, 8088, 80186, 80286, 80386, 80486, Pentium, etc. including the current multicore microprocessors. IBM chose to base their PC on the 8086 and 8088, then as successive newer microprocessors were developed new versions of the IBM PC used those microprocessors. Intel also produced many specialized microprocessors and microcontrollers including some RISC microprocessors (e.g. i860, i960). Current Apple Macintosh computers also use the latest Intel multicore microprocessors.


To find square root of a number look-up table method 8085?

52


Why rstn has 6 t state in 8085 microprocessors?

4 T-states as usual and 2 more are required to perform n*8 its result gives the vector address of interrupt service routine(rstn is an software interrupt)