Write an assembly procedure that takes a 32-bit signed integers array Arrl of size Sizel and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write an assembly procedure that takes a 32-bit signed integers array Arrl of size Sizel and a given number N1 then counts how many numbers less than N1 appear in the array Arr1. Preconditions: (1) The start index of the array Arr1 is stored in edx. (2) The array size Sizel is stored in ecx. (3) The number N1 is stored in ebx. Post conditions: (1) Number of numbers less than N1 in Arrl is stored in eax. (2) All used registers, inside the procedure, are retained back to original values (hint: use the stack). .data Arr1 Sizel N1 .code DWORD 8, -7, 10, 3, 2, 0, 1 DWORD 7 DWORD 5 ; Define the procedure here main PROC lea edx, Arrl www. mov ecx, Sizel www mov ebx, N1 www ; Call the procedure here INVOKE ExitProcess, 0 main ENDP END main Write an assembly procedure that takes a 32-bit signed integers array Arrl of size Sizel and a given number N1 then counts how many numbers less than N1 appear in the array Arr1. Preconditions: (1) The start index of the array Arr1 is stored in edx. (2) The array size Sizel is stored in ecx. (3) The number N1 is stored in ebx. Post conditions: (1) Number of numbers less than N1 in Arrl is stored in eax. (2) All used registers, inside the procedure, are retained back to original values (hint: use the stack). .data Arr1 Sizel N1 .code DWORD 8, -7, 10, 3, 2, 0, 1 DWORD 7 DWORD 5 ; Define the procedure here main PROC lea edx, Arrl www. mov ecx, Sizel www mov ebx, N1 www ; Call the procedure here INVOKE ExitProcess, 0 main ENDP END main
Expert Answer:
Answer rating: 100% (QA)
Here is the assembly code for the procedure that counts how many numbers less than N1 appear in the ... View the full answer
Related Book For
Data Analysis and Decision Making
ISBN: 978-0538476126
4th edition
Authors: Christian Albright, Wayne Winston, Christopher Zappe
Posted Date:
Students also viewed these programming questions
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
On July 1,the first day of their fiscal year, the City of Denver sold bonds with a face value of $10,000,000 at 102 percent par. The bonds bear annual interest at 6 percent; interest is payable...
-
If friends offer to give you $8 in a month if you give them $8 today, would you do it? Why or why not? How much would they have to pay back for you to give them the $8 today? Why?
-
A researcher was interested in determining risk factors for high blood pressure (hypertension) among women. Data from a sample group of 680 women were collected. The following table gives the...
-
A chemical engineer studied the effect of the amount of surfactant and time on clathrate formation. Clathrates are used as cool storage media. Table B. 8 summarizes the experimental results. a. Fit a...
-
Jessica Company manufactures hockey pucks and soccer balls. For both products, materials are added at the beginning of the production process and conversion costs are incurred evenly. Jessica uses...
-
Will the "government" or the "free market" be better able to manage the cost of healthcare?
-
6. What amount do you need to deposit now into an account earning 4.5% every four months if you need $45,000 at the end of 8 years? Please show all work.
-
Suppose that the 9-month SOFR interest rate is 8% per annum and the 6-month SOFR interest rate is 7.5% per annum (both with actual>365 and continuous compounding). Estimate the 3-month SOFR futures...
-
In the same study of water quality, \(n=176\) samples were taken from streams having a high environmental impact from sheep farming. Out of these \(y=24\) had a high Campylobacter level. Let be the...
-
Explain how an ABS is structured.
-
A trader is looking for arbitrage opportunities in the Treasury bond futures market. What complications are created by the fact that the party with a short position can choose to deliver any bond...
-
What happened to the large investment banks following the 20078 crisis?
-
In the United States, the percentage of children and adolescents affected by obesity has more than tripled since the 1970s. Data from 2015-2016 show that 1 in 5 school age children in the United...
-
You are a U.S. investor who purchased British securities for 2,000 one year ago when the British pound cost U.S. $1.50. What is your total return (based on U.S. dollars) if the value of the...
-
Do undergraduate business students who major in finance earn, on average, higher annual starting salaries than their peers who major in marketing? Address this question through a statistical...
-
In the product mix model it makes sense to change the maximum sales constraint to a minimum sales constraint, simply by changing the direction of the inequality. Then the input values in row 23 can...
-
Recall from Chapter 2 that the HyTex Company is a direct marketer of technical products and that the file Catalog Marketing.xlsx contains recent data on 1000 HyTex customers. To understand these...
-
Suppose that in September 2013 a company takes a long position in a contract on May 2014 crude oil futures. It closes out its position in March 2014. The futures price (per barrel) is \($88.30\) when...
-
Explain how the control variate technique is implemented.
-
A company wishes to hedge its exposure to a new fuel whose price changes have a 0.6 correlation with gasoline futures price changes. The company will lose $1 million for each 1 cent increase in the...
Study smarter with the SolutionInn App