#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...
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
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....
-
In the Oregon Pick 4 lottery game, a bettor selects four numbers between 0 and 9 and any selected number can be used more than once. Winning the top prize requires that the selected numbers match...
-
A random sample of 5222 permanent dwellings on the entire Navajo Reservation showed that 1619 were traditional Navajo hogans (Navajo Architecture: Forms, History, Distributions by Jett and Spencer,...
-
The point at which solid, liquid, and gas phases co-exist is known as the (a) Freezing point (b) Triple point (c) Boiling point (d) None of these.
-
Meera Corporation issued 4,000, 8%, 5-year, $1,000 bonds dated January 1, 2014, at 100. (a) Prepare the journal entry to record the sale of these bonds on January 1, 2014. (b) Prepare the journal...
-
Please explain "actual malice" and "reckless disregard for the truth" as defined by the U.S. Supreme Court in Times v. Sullivan . Libel potential scenario :You are the editor of your local newspaper....
-
the company's stock price (over and above the current price) up to an increase of $10; for every dollar increase over $10, the executive will receive $500,000. The current price of the stock is...
-
Would prostitution be more injurious or less injurious to the public health, welfare, and morality if it were legalized and regulated?
-
Is there a valid reason to exempt close family relatives from punishment as accessories after the fact to felonious conduct?
-
Do you think proponents of same-sex marriage can use the Supreme Courts decision in Lawrence v. Texas as a basis for constitutional assaults on state laws that prohibit such unions?
-
Given the First Amendment protections of freedom of expression and association, can members of a revolutionary political organization be prosecuted for conspiring to overthrow the government of the...
-
Name some items that would ordinarily be subject to confiscation under a statute proscribing possession of drug paraphernalia.
-
Jacky is resident for taxation purpose and live in Sydney was paid $12500 (one off) for export advice given to the Australian government while he served as a member of royal commission enquiring into...
-
Refrigerant-134a enters an adiabatic compressor as saturated vapor at 120 kPa at a rate of 0.3 m3/min and exits at 1-MPa pressure. If the isentropic efficiency of the compressor is 80 percent,...
-
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...
-
Brooks Development Corporation (BDC) faces the following capital budgeting decision. Six real estate projects are available for investment. The net present value and expenditures required for each...
-
Morgan Inc. is planning the purchase of one of the component parts it needs for its finished product. The anticipated demands for the component for the next 12 periods are shown in the following...
-
John White is the program scheduling manager for the television channel CCFO. John would like to plan the schedule of television shows for next Wednesday evening. The table below lists nine shows...
Study smarter with the SolutionInn App