Consider the following 0x86 program: .data array DWORD 1,2,3,4,5,6,7,8,9 aravSize (Sarray)/4 ; array .code main PROC...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following 0x86 program: .data array DWORD 1,2,3,4,5,6,7,8,9 aravSize (Sarray)/4 ; array .code main PROC mov ecx,arraySize1 mov esi.OFFSET array L1: mov eax. [esi] sda mov bx,2 idiv bx add esi,4 smp edx,0 je lbl jmp, next Ibl: mov eax.[esi] shr eax,1 mov [esi],eax next: loop L1 exit main ENDP END main What is the content of the array at the end of the program? a) 1,1,3,2,5,3,7,4,9 b) 0,1,1,2,2,3,3,4,4 c) 1,2,1,4,2,3,7,8,4 d) 0,2,1,4,2,6,3,8,4 Consider the following 0x86 program: .data array DWORD 1,2,3,4,5,6,7,8,9 aravSize (Sarray)/4 ; array .code main PROC mov ecx,arraySize1 mov esi.OFFSET array L1: mov eax. [esi] sda mov bx,2 idiv bx add esi,4 smp edx,0 je lbl jmp, next Ibl: mov eax.[esi] shr eax,1 mov [esi],eax next: loop L1 exit main ENDP END main What is the content of the array at the end of the program? a) 1,1,3,2,5,3,7,4,9 b) 0,1,1,2,2,3,3,4,4 c) 1,2,1,4,2,3,7,8,4 d) 0,2,1,4,2,6,3,8,4
Expert Answer:
Answer rating: 100% (QA)
Answer First of all you can simplify your code Copy Code reverseLoop mov eax esi move the element in esi to eax mov ebx edi move the element in edi to ... View the full answer
Related Book For
An Introduction to the Mathematics of Financial Derivatives
ISBN: 9780123846822
3rd edition
Authors: Ali Hirsa, Salih N. Neftci
Posted Date:
Students also viewed these programming questions

Allergan is a major pharmaceutical firm. You work for Allergan's CFO and are evaluating a major and expensive drug trial. The drug trial would require an investment of $95 million today If the trial...

Consider the MPS record below Wk 1 2 3 4 5 6 Forecast 15 25 9 15 22 5 Orders 7 10 10 10 Available ATP MPS On hand = 5, Lot size = 30 a. Complete the MPS record b. Update the record from part a ...

Determine CPI, ETC (1), and EAC. Activity Total PV 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 6 6 2 20 10 10 3 30 9 6 6 6 3 4 20 8 2 5 5 5 16 4 4 4 4 6 18 9 9 7 8 4 4 Status Report: Ending Period 5 Task %...

The table lists the actual annual cost y to drive a midsize car 15,000 miles per year for selected years X. (a) Predict whether the correlation coefficient is positive, negative, or zero. (b) Find a...

Use the following contingency table: a. Compute the expected frequency for each cell. b. Compare the observed and expected frequencies for each cell. c. Compute x 2 STAT . Is it significant at =...

Write a brief paragraph that compares the method used to rationalize the denominator of a radical expression and the method used to write the quotient of two complex numbers in standard form.

On December 31, 2010, Post Company decided to invest a sufficient amount of cash to pay the principal amount of a $160,000 debt due on December 31, 2013. The company will make four equal annual...

On June 30, 2009, County Company issued 12% bonds with a par value of $800,000 due in 20 years. They were issued at 98 and were callable at 104 at any date after June 30, 2017. Because of lower...

You are required to write a research paper of 2,500 to 3,000 words in length (with a typical font and spacing, this will come out to 10 to 12 pages). Your paper should present a comparison study of...

A base band digital transmission system that sends Avalued rectangular pulses through a channel at a rate of 20,000 bps is to achieve an error probability of 10 6 . If the noise power spectral...

A firm has a longterm debtequity ratio of 0.43. Shareholders equity is $1.3 million. Current assets are $221,000, and total assets are $1.989 million. If the current ratio is 1.7, what is the ratio...

What is the purpose of link controls in the communication subsystem?

Distinguish between the desired upper precision limit and the computed upper precision limit. How is each determined ?

Why is it sometimes useful to employ redundant calculations in a program? In what types of programs would redundant calculations be most useful?

State the relationship between the preliminary evaluation of an internal control system and tests of compliance.

What is the purpose of timing controls within the central processing unit?

A General Power bond with a face value of $1,000 carries a coupon rate of 9.0%, has 9 years until maturity, and sells at a yield to maturity of 8.0%. (Assume annual interest payments.)

Consider the reaction of acetic acid in water CH 3 CO 2 H(aq) + H 2 O(l) CH3CO 22 (aq) + H 3 O + (aq) where Ka 5 1.8 3 1025. a. Which two bases are competing for the proton? b. Which is the stronger...

Considering the following SDE for the spot rate: drt = ( rt)dt + rtdWt (19.41) Using the following set of parameters: r0 = 0.03 (19.42) = 1.5 (19.43) = 0.06 (19.44) = 0.25 (19.45) T = 1 (19.46)...

We consider the random process St, which plays a fundamental role in BlackScholes analysis: where Wt is a Wiener process with W0 = 0, is a "trend" factor, and (Wt Ws) N (0, (t s)) which says...

Consider the meanreverting process dSt = ( St)dt + StdWt. Create a time discretization of = 1/252 and assume that the appropriate monthly model parameters are: = 0.75 = 0.35 S0 = 40 Consider the...

Understand the various roles required in the front office as well as the importance of yield management.

List the principal sources of income and expense by department according to the uniform system of accounts for hotels.

Outline a potential career path that leads to filling the role of general manager.
Study smarter with the SolutionInn App