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)
Sure Heres an assembly procedure that takes an array Arrl of size Sizel and a given number N1 and counts how many numbers less than N1 appear in the array The procedure follows the provided preconditi... 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
-
What is the Halting Problem, and why is it undecidable for Turing Machines?
-
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...
-
Peter Schultz IV, president of Schultz Quality Furniture, takes pride in carrying on a tradition of manufacturing custom quality furniture, a skill that was started by his great-grandfather in...
-
What is the magnetic flux through the loop shown in FIGURE EX30.4? x x x x . X_X xx. Xx . 1.0T 2.0T 20 cm xx"X x. XX x X Xx X X .. 20 m 20 m FIGURE EX30.4
-
The Metropolitan City Hospital is unionized. In 2006, nurses received an average annual salary of $45,000. The hospital administrator is considering how the contract with nurses should be changed for...
-
The following are transactions or items that are frequently reported in financial statements: 1. Income effect due to changing from the double-declining-balance method to the straight-line method of...
-
Find the mode of each group of numbers: 1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,5,5,5,
-
What does the calculated data tell us about Red Dress Press, Inc.? Provide an analysis that includes comparison to industry averages as well as year to year comparison. Is Red Dress Press, Inc....
-
hu Jan 14 docs.google.com Which safety stock option has the largest amount of total cost? * 1 point The Shalom Company wishes to determine the amount of safety stock that it should maintain for...
-
you manage a bond portfolio worth 400 million. you wish to hegdge your portfolio against rise in interest rates by
-
Cullumber Inc. operates a lumber yard. Cullumber purchases the raw materials for $53300 and incurs additional processing costs of $39500 to obtain three observable joint products. Further processing...
-
What are the challenges and benefits of implementing a telecommuting policy from an organizational behavior perspective? Explain
-
Solve the following differential equations. a) dy + 3y = 2xe- ax b) +3x=2t, x(2)=1 dt
-
4. An ideal turbojet engine operates on the Brayton cycle. At the inlet of the compressor (at station 2) the stagnation pressure is 100 kPa and the temperature is 250 K. The compressor pressure ratio...
-
As this is a writing course, your discussion board posts will be graded on content, sentence structure, spelling, and grammar. As this is a description, it should be written in the 3 rd person, use...
-
The trade-off theory relies on the threat of financial distress. But why should a public corporation ever have to land in financial distress? According to the theory, the firm should operate at 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...
-
Can any financial product normally make it possible to obtain resources at below market cost?
-
Redo the exercise above, assuming in the first case that the Faurecia share rises to 40 or falls to 25. What is the impact on the value of the option? What basic feature of the option have you...
-
You wish to value a call option on the Faurecia share (which does not pay dividends) after 6 months with a strike price of 35 and a 6-month duration. You do not know what volatility to factor in....
Study smarter with the SolutionInn App