Program analysis , Electrical Engineering

Program Analysis

We have to find the greater of two given  number. We  can store the given  numbers  in two  different  registers ( suppose register A and B). Then we will compare the  contents  of  register B with  the contents of accumulator A. If the contents A are greater than B  Both  CY and Z  flag is reset.  If  the contents of A are equal  to B, Z  flag is  set and CY  flag is  reset. Here we assume for simplicity  of the  program that the  given  numbers are not  equal   then only carry flag can decide that which  number is greater. F carry flag  is set  the content of accumulator  A are less  than the contents  of B otherwise  the contents  of B  are greater  than the contents  of accumulator A.

Flow chart   : it is better  to draw  the flow  chart before  writing the program.

Posted Date: 4/5/2013 1:21:33 AM | Location : United States







Related Discussions:- Program analysis , Assignment Help, Ask Question on Program analysis , Get Answer, Expert's Help, Program analysis Discussions

Write discussion on Program analysis
Your posts are moderated
Related Questions
In 8086 Carry flag, Parity flag, Auxiliary carry flag, Zero flag, Overflow flag, Trace flag, Direction flag Interrupt flag and Sign flag.   Mainly there ae two types of int

What is TPA (transient program area)? The memory system is divided in three major parts: transient program area, System is and XMS that is extended memory system.

Third Generation ( 1964- 1982 ) Invention of  technology  of integrated circuits created computers  of third  generation. In  several  logical  gates  are fabricated on a singl

Image gradient Write an m-file "grad.m" which computes and displays gradient and orientation of an input image (use Gaussian derivatives). To compute Gaussian derivative in o

Q. Explain about 'Emitter Follower'? EMITTER FOLLOWER : An emitter follower circuit shown in the figure is widely used in AC amplification circuits. The input and output of the

Significance of form factor,why we decide the power handing capacity in transmission with the help of form factor?

Q. For the CS JFET ampli?er circuit of Figure, R D = 2k and R L = 3k. The JFET with ro = 15 k has a voltage gain A v1 =-4.5 when the entire source resistance is bypassed. Fin

This project is about another particular application of a particular embodiment of the patent: A Long Stroke Steam Engine using Solar Generated Steam. The machine elements such as

a dc generator has 300 turns in each field coil. the flux per pol is 0.1 wb. find the average value of EMF inducet in field winding in the flux decays to zero in 0.3 second?

(a) contains a freewheeling diode Dm, commonly connected across an inductive load to provide a path for the current in the inductive load when the switch S is opened after time t (