answersLogoWhite

0


Best Answer

You do this by constructing a loop and adding up the individual instruction times and multiplying by the loop count, offsetting the end of loop and overhead.

For example, in the 8085, running at a 3 MHz clock (6 MHZ crystal) with no wait states, and a desired 1 ms delay...

PUSH PSW ; 12

MVI A,212 ; 7

LOOP DCR A ; 4

JNZ LOOP ; 7/10

NOP; 4

POP PSW ; 12

The numbers in the comments are the clock cycles for the instructions, assuming no wait states. (If you had wait states, you would need to incorporate them.) At 3 MHz, 1 ms is 3000 clocks. Overhead is 32 clocks, 35 - 3 for the last iteration of the loop. That leaves 2972 clocks. Divide that by 14, the loop time, and you get a loop count of 212. The total time will be 32 + 212 * 14, or 3000 clocks. The NOP instruction compensates for the fact that the actual total time without it would be 2996 clocks.

If you need more time, you add more "busy" time inside the loop, or make nested loops. Better, because this does not compensate for other processing time, is to setup an external counter and feed it into an interrupt, perhaps RST7.5, at the desired frequency.

As far as the 8086/8088, I cannot answer, because I am not intimate with that processor. As far as higher incarnations of processors, that is even harder because latency and cache hit/miss ratios inter into the equation, but you get the picture with this example.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you find the instruction execution time of the instructions in a loop for given critical frequency and lower and higher bytes of variable count?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

For satellite communication the frequency should be less than critical frequency?

For satllite communication the frequency should not be less than the critical frequency because in satellite communicaton high frequency is needed which is reflected by satellite but not by the ionosphere.


What is formula to find maximum usable frequency?

I suppose the formula is: MUF=critical frequency/cosine(angle of incidence). ex:The MUF for an angle of incidence of 60 deg and a critical frequency of 60MHz will be MUF=60 * 10^6/cos(60) =120 MHz By VSR


How effective is the functions whose unique competencies are critical to the execution of the strategic task?

What are you talking about? You Homo What are you talking about? You Homo


Which critical element of instruction means factoring in incentives and reasons that are important to the learner?

Motivation is the critical element of instruction that involves factoring in incentives and reasons that are important to the learner. By understanding and addressing the learner's motivations, educators can create a more engaging and effective learning experience.


What is critical region in os?

Critical region is a part of a program that must complete execution before other processes can have access to the resources being used. Processes within a critical region can't be interleaved without threatening integrity of the operation.


What is second critical speed of turbine?

Critical speed means where natural frequency is equal to system frequency.


What are the critical parts in a transmitter?

The frequency control portions are most criticall. crystals were used to stabilize frequency and avoid problems with interference or ( harmonics) as it was called. Ham transmitters can be banned if they are off-frequency and produce audible harmonics which can interfere with TV reception. So- for legal reasons, the fine-tuning and Frequency control elements are critical, so are voice or code input jacks, amplifiers. and so on.


Why did the air force change the name of cip to carm?

to empasize the focus on managing risk to critical assets, execution of our missions and capabilities.


Define the terms logging interval dedicated control system and Frequency of Sampling?

what do you mean by terms under damped, critical damped and over damped frequency of control system?


What is torsional critical speed?

The term torsional critical speed of centrifugal pumps and associated drive equipment refers to the speed of a pump rotor or related rotating system that corresponds to a resonant frequency of torsional vibration of the rotating system. Torsional critical speeds are associated with torsional or angular deflection of the rotor and are not to be confused with lateral critical speeds associated with lateral deflection. The two are separate entities. A given rotor or rotating system may possess more than one torsional resonant frequency or torsional critical speed. The lowest frequency which produces the "first mode shape" and "first torsional critical speed" is in general of the most concern. Torsional vibration is caused by torsional excitation from sources such as variable frequency drive motor toque pulsations, combustion engine torque spikes and impeller vane pass pulsation. The calculation of the first torsional critical speed is fairly simple for simple rotor systems.


What Is used to store start-up instructions and other critical information for all modern computers?

ROM!


Critical software facilities?

The most critical software facilities is the system software particularly the operating system for this systems are the one responsible for the operations and the proper running of all the hardware and the correct execution of tasks given by a program.