Question

Counters must have a separate input or instruction to reset. How would you assure that all...

Counters must have a separate input or instruction to reset. How would you assure that all counters are reset and their accumulators show 0 when you start a process?

Homework Answers

Answer #1

In the begining of process you can add a routine which checks if the values of counters you want to use are zero. if ther are not then add a reset instruction. Also save the counter value to some other variable/register before setting it zero as other process might be using them. Follwing is the pseudo code of the routine to make sure counters are zero.

counter_check()
{

If counter_value is 0:
continue;
else:
counter_old = counter_value;
counter_value = 0;

}

Make a routine to set back the old value of counter

counter_setback()
{
counter_value = counter_old;
}

You can call this routine at the beginin of your process

process()
{
counter_check()
........
........
........
counter_setback()
}

I hope you get the idea. You can easily convert the pseudo code in assembly language by using conditional jumps,call, MOV and reset instructions wherever required.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
What would happen with the ring counter if the reset switch set the value of the...
What would happen with the ring counter if the reset switch set the value of the counter to a ‘3’ instead of a ‘1’? Group of answer choices There would be a false output, but the counter would continue to run in the proper order after the “3” state The counter will count in the sequence: 3 -> 6 -> 5 -> 3 -> 6 -> ... which means two “on” outputs will be shifted left. The “3” state was...
How would you separate (+)-or (-) - tartaric acid from meso-tartaric acid? How would you separate...
How would you separate (+)-or (-) - tartaric acid from meso-tartaric acid? How would you separate (+)-or (-) - tartaric acid?
How would you evaluate a patient’s ability to understand your instruction and their current knowledge base...
How would you evaluate a patient’s ability to understand your instruction and their current knowledge base about their problem? What characteristics of the patient would be helpful? How would you be certain that the patient understands your medication instruction? What methods of therapeutic communication would be useful in advanced practice?
List at least 3 examples of how you would divide students into groups for instruction.
List at least 3 examples of how you would divide students into groups for instruction.
How would you separate ag from hg
How would you separate ag from hg
C#: Prompt the user to input a sentence. Once you have their sentence, figure out how...
C#: Prompt the user to input a sentence. Once you have their sentence, figure out how many vowels (a, e, i, o, u) and how many consonants are in the sentence. Output the total number of consonants and vowels in the following format (2 separate lines and the format specifier should be general with 0 decimal places!) There were 5 vowels in the sentence. There were 15 consonants in the sentence.
Suppose you need to prepare 1.0 L of Stock solution which must have a concentration of...
Suppose you need to prepare 1.0 L of Stock solution which must have a concentration of 150 mg N/L. You start with solid Potassium Nitrate, KNO3 . A. How many moles of Nitrogen should 1.0 L of Stock solution contain? B. How many moles of KNO3 should 1.0 L of stock solution contain? C. Please show working. How many grams of KNO3 will you have to weigh out to prepare 1.0 L of stock solution? (Show ALL work!) (Reminder: the...
Explain how, as a social worker, you would ensure that you separate the war from the...
Explain how, as a social worker, you would ensure that you separate the war from the warrior. How might you demonstrate these strategies to military personnel?
You have been told that you must give up one of your senses. Which one would...
You have been told that you must give up one of your senses. Which one would you choose not to have? Why would you choose this sense and not one of the others? Describe the physiological process/physical structures that would be affected by your lack of this sense?
Problems: 1-How many nodes would you expect to find when n=3? Where would you expect the...
Problems: 1-How many nodes would you expect to find when n=3? Where would you expect the maxima to be (psi)? 2- What is the minimum n value where you could start finding (psi) with a value < 0? 3-What is the minimum n value where you could start finding (psi)^2 with a value < 0?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT