#include typedef struct Point ( int x; int y: > Point; int fune(Point pl, Point p2);...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
#include typedef struct Point ( int x; int y: > Point; int fune(Point pl, Point p2); int main(){ Point p1, p2; pl.x = 8: pl.y = 10; p2.x = 2; p2.y = 6; printf("d ", func(pl, p2)); return 0; func: push1 sebp. movi tesp, tobp pushl tesi subl $20, teap. movi 20(tebp), teax movi 16(tebp), tecx 12(ebp), tedx movi movi 8(hebp), lesi movi tesi, -16(ebp) movi tedx, -12(tebp) movi secx, -24(lebp) Reax, -20 (Lebp) movi movi -12(tebp), Beax addl -24(Sebp), leax addl $20, lesp popl tesi popl ebp ret Given the assembly code for func, the output of the program is: #include typedef struct Point ( int x; int y: > Point; int fune(Point pl, Point p2); int main(){ Point p1, p2; pl.x = 8: pl.y = 10; p2.x = 2; p2.y = 6; printf("d ", func(pl, p2)); return 0; func: push1 sebp. movi tesp, tobp pushl tesi subl $20, teap. movi 20(tebp), teax movi 16(tebp), tecx 12(ebp), tedx movi movi 8(hebp), lesi movi tesi, -16(ebp) movi tedx, -12(tebp) movi secx, -24(lebp) Reax, -20 (Lebp) movi movi -12(tebp), Beax addl -24(Sebp), leax addl $20, lesp popl tesi popl ebp ret Given the assembly code for func, the output of the program is:
Expert Answer:
Related Book For
Computer Systems A Programmers Perspective
ISBN: 9781292101767
3rd Global Edition
Authors: Randal E. Bryant, David R. O'Hallaron
Posted Date:
Students also viewed these programming questions
-
Briefly describe ASCII and Unicode and draw attention to any relationship between them. [3 marks] (b) Briefly explain what a Reader is in the context of reading characters from data. [3 marks] A...
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
Coffin Corporation appropriately uses the installment-sales method of accounting to recognize income in its financial statements. The following information is available for 2014 and 2015....
-
a. Five "mathletes" celebrate after solving a particularly challenging problem during competition. If each mathlete high fives each other mathlete exactly once, what is the total number of high...
-
Clear Lake has a surface area of 708,000 m2 (70.8 ha). For a given month the lake has an inflow of 1.5m3/s and an outflow of 1.25m3/s. A +1.0 -m storage change or increase in lake level was recorded....
-
1. Your instructor will divide the class into teams and assign each team the task of investigating the start-up of one of the following businesses: a. Submarine sandwich shop b. Day care service c....
-
Preparing a Balance Sheet and Analyzing Some of Its Parts Exquisite Jewelers is developing its annual financial statements for 2012. The following amounts were correct at December 31, 2012: cash,...
-
A certain substance has a mass per mole of 53 g/mol. When 312 J is added as heat to a 26.0 g sample, the sample's temperature rises from 21.0C to 45.0C. What are the (a) specific heat and (b) molar...
-
Rankin, the comptroller of Lazy, Inc. has been embezzling funds from his employer for many years, To date, he has taken almost $5,000,000. In view of the fact that Rankin will have to repay this to...
-
Find the Present Value of Your Future Earnings at Graduation In personal risk evaluation and the decision of how much insurance to purchase, one important consideration is the current and future...
-
Make the respective entries to the Journal of the different transactions. In each transaction there are the accounts that are affected. The amount of $300.00 of the prepaid rent was used. The amount...
-
Problem 4 (40%) Genent Industries, Inc. (GII), developed standard costs for direct material and direct labor. In 2018 GII estimated the following standard costs for one of their major products, the...
-
Calculate the Shareholder Value Added for the company using one of the techniques covered in the module material or based on research from analysts that you find online. Are you pleased with the...
-
17. Dar's Fashions sold merchandise for $40,000 during the month of July 2023. Sales returns during that month amounted to $1000. If the company's gross profit rate is 40%, Dar's will report monthly...
-
Which of the following is correct about Caltexs acquisition of Milemaker? Group of answer choices a, The acquisition is considered by the ACCC to substantially reduce competition because the barrier...
-
What is a lobbyist in US? How did this term emerge?
-
Assume the following values are stored at the indicated memory addresses and registers: Fill in the following table showing the effects of the following instructions, in terms of both the register or...
-
Assume that a CGI program needs to send dynamic content to the client. This is typically done by making the CGI program send its content to the standard output. Explain how this content is sent to...
-
This problem concerns the m.o and swap.o modules from Figure 7.5. For each symbol that is defined or referenced in swap.o, indicate whether or not it will have a symbol table entry in the .symtab...
-
In July 2006, the International Brotherhood of Teamsters, Local Union 25, filed two petitions and held an election for a collective bargaining representative at two FedEx locations. However, FedEx...
-
The trustee calculated Millers current monthly income to be \($6,601.91.\) The disagreement stemmed from a paycheck Miller received on October 10, 2013, in the amount of \($2,942.66,\) for wages that...
-
Miller filed for Chapter 7 bankruptcy protection on April 26, 2013. Based upon the filing date, the period for determining Millers current monthly income was October 1, 2012, through March 31, 2013....
Study smarter with the SolutionInn App