1- For the program below: a) Find the number of times the NOP instruction is executed....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1- For the program below: a) Find the number of times the NOP instruction is executed. b) Modify the program to execute the NOP operation 20000 times. LDI R16, 0xC8 R18, 0xAA LDI NOP +0000: +0001: +0002: +0003: +0004: +0005: +0006: +0008: +0100: COUNTI: COUNT2: END: 2- For the program below: a) Analyze the stack and stack pointer SP after the each one of the underlined instructions. b) Calculate the time delay provided by the subroutine if processor frequency is 1 MHz. +0101: +0102 +0103: +0104: +0105: .ORG 0 LDI OUT LDI OUT LDI PUSH CALL POP .ORG 0x100 DELAY: AGAIN: NOP DEC R18 BRNE COUNT2 LDI NOP NOP DEC BRNE RET DEC R16 BRNE COUONTI RJMP END R16, HIGH (RAMEND) SPH, R16 R16, LOW (RAMEND) SPL, R16 R31, OxAA R31 DELAY R16 R20, 200 R20 AGAIN 0x08FF 3- Write an assembly language program that continuously monitor port B then send the received data to port C if positive or port D if negative. A delay subroutine of 5000 NOP instructions should be called after each data sending. 1- For the program below: a) Find the number of times the NOP instruction is executed. b) Modify the program to execute the NOP operation 20000 times. LDI R16, 0xC8 R18, 0xAA LDI NOP +0000: +0001: +0002: +0003: +0004: +0005: +0006: +0008: +0100: COUNTI: COUNT2: END: 2- For the program below: a) Analyze the stack and stack pointer SP after the each one of the underlined instructions. b) Calculate the time delay provided by the subroutine if processor frequency is 1 MHz. +0101: +0102 +0103: +0104: +0105: .ORG 0 LDI OUT LDI OUT LDI PUSH CALL POP .ORG 0x100 DELAY: AGAIN: NOP DEC R18 BRNE COUNT2 LDI NOP NOP DEC BRNE RET DEC R16 BRNE COUONTI RJMP END R16, HIGH (RAMEND) SPH, R16 R16, LOW (RAMEND) SPL, R16 R31, OxAA R31 DELAY R16 R20, 200 R20 AGAIN 0x08FF 3- Write an assembly language program that continuously monitor port B then send the received data to port C if positive or port D if negative. A delay subroutine of 5000 NOP instructions should be called after each data sending.
Expert Answer:
Answer rating: 100% (QA)
Step 1 1 Number of times the NOP instruction is executed The NOP instruction is executed twice each time the COUNT2 loop is iterated Since the COUNT2 loop is iterated R18 times the NOP instruction is ... View the full answer
Related Book For
Computer Organization And Design The Hardware Software Interface
ISBN: 9780123747501
4th Revised Edition
Authors: David A. Patterson, John L. Hennessy
Posted Date:
Students also viewed these programming questions
-
Convert the following table into the previous relation in a normalized Boyce-Codd Normal Form (BCNF) Employee First Last ID Name Name 0001 0002 0003 0004 0005 0006 0007 John Smith Brian Miller James...
-
Solve the compound linear inequality graphically. Write the solution set in set-builder or interval notation, and approximate endpoints to the nearest tenth whenever appropriate. 1.59.10.5x6.8
-
In response to a new banking regulation, the consulting department of your CPA firm has been retained to determine the amounts that a bank client overcharged customers on their credit cards. A...
-
There are four radio stations in Midland. The stations have different formats (hard rock, classical, country/western, and easy listening), but each is concerned with the number of minutes of music...
-
Consider the vector \(u\) that consists of 32 equally spaced samples of the function \(f(t) \approx \cos (4 \pi t)\) on the interval [0,1]. That is, \(u_{1}=f(0), u_{2}=\) \(f\left(\frac{1}{32}...
-
The 2009 financial statements of 3M Company report net sales of $23.1 billion. Accounts receivable (net) are $3.2 billion at the beginning of the year and $3.25 billion at the end of the year....
-
- - (a) Represent the expression ((x + 2) 3) * (y (3+x)) - 5 using a binary tree. Write this expression in (b) prefix notation (doing a preorder traversal). (c) postfix notation (doing a postorder...
-
Pacifico Company, a U.S.-based Importer of beer and wine, purchased 1,500 cases of Oktoberfest-style beer from a German supplier for 375,000 euros. Relevant U.S. dollar exchange rates for the euro...
-
How can we integrate data visualization and supplementary visual aids to augment the clarity and impact of our written reports and proposals ?
-
How does the concept of federalism complicate the administration of criminal justice in the United States?
-
What factors should a judge consider in determining whether to sentence a convicted felon to prison?
-
Can you think of an example of an ex post facto law?
-
Can a municipality enforce an ordinance totally banning religious organizations from canvassing neighborhoods in search of new members? What about an ordinance that prohibits such canvassing between...
-
Why has the common-law doctrine distinguishing between principals and accessories before the fact diminished in importance in contemporary criminal law?
-
Do Now: Exercise I: Consider the function rule: multiply the input by two and then subtract one to get the (a) Fill in dhe table below for inputs and outputs. Inputs are often designated by x and...
-
Distinguish among total-moisture content, free-moisture content, equilibrium-moisture content, unbound moisture, and bound moisture.
-
Write down the bit pattern in the mantissa assuming a floating point format that uses Binary Coded Decimal (base 10) numbers in the mantissa instead of base 2. Assume there are 24 bits, and you do...
-
How much energy is spent to execute an ADD instruction in a single-cycle design and in the 5-stage pipelined design? This exercise explores energy efficiency and its relationship with performance....
-
Convert A into a decimal number, assuming it is unsigned. Repeat assuming it stored in sign-magnitude format. Show your work. The book shows how to add and subtract binary and decimal numbers....
-
What is the difference between real objects and virtual objects? Give an example for each.
-
How do business classes differ from utility classes? Provide one example for each.
-
Give three specialized subclasses for the Student class.
Study smarter with the SolutionInn App