You are given the following information. A function with prototype void decode1(long *xp, long *yp, long *zp);
Question:
You are given the following information. A function with prototype
void decode1(long *xp, long *yp, long *zp);
Is compiled into assembly code, yielding the following:
Parameters xp, yp, and zp are stored in registers %rdi, %rsi, and %rdx, respectively. Write C code for decode1 that will have an effect equivalent to the assembly code shown.
Transcribed Image Text:
void decodel (long *xp, long *yp, long *zp) xp in %rdi, yp in %rsi, zp in %rdx decode1: movq movq movq movq movq movq ret (%rdi), %r8 (%rsi), %rcx (%rdx), %rax %r8, (%rsi) %rcx, (%rdx) %rax, (%rdi)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (1 review)
Reverse engineering is a good way to understand systems In this case w...View the full answer
Answered By
Aysha Ali
my name is ayesha ali. i have done my matriculation in science topics with a+ . then i got admission in the field of computer science and technology in punjab college, lahore. i have passed my final examination of college with a+ also. after that, i got admission in the biggest university of pakistan which is university of the punjab. i am studying business and information technology in my university. i always stand first in my class. i am very brilliant client. my experts always appreciate my work. my projects are very popular in my university because i always complete my work with extreme devotion. i have a great knowledge about all major science topics. science topics always remain my favorite topics. i am also a home expert. i teach many clients at my home ranging from pre-school level to university level. my clients always show excellent result. i am expert in writing essays, reports, speeches, researches and all type of projects. i also have a vast knowledge about business, marketing, cost accounting and finance. i am also expert in making presentations on powerpoint and microsoft word. if you need any sort of help in any topic, please dont hesitate to consult with me. i will provide you the best work at a very reasonable price. i am quality oriented and i have 5 year experience in the following field.
matriculation in science topics; inter in computer science; bachelors in business and information technology
_embed src=http://www.clocklink.com/clocks/0018-orange.swf?timezone=usa_albany& width=200 height=200 wmode=transparent type=application/x-shockwave-flash_
4.40+
11+ Reviews
14+ Question Solved
Related Book For
Computer Systems A Programmers Perspective
ISBN: 9781292101767
3rd Global Edition
Authors: Randal E. Bryant, David R. O'Hallaron
Question Posted:
Students also viewed these Computer science questions
-
You are given the following information concerning the initial cost of capital of starting a business, the licensing fees and other permits costs of starting the business, and income per capita in...
-
You are given the following information about We-Save-Um Animal Rescue (WSU): Number of dogs rescued and placed by WSU600 Average length of stay for a dog10 days Daily cost of feeding one dog$. 90...
-
You are given the following information for the commodity market, in which taxes, planned investment, government spending on goods and services, and net exports are autonomous, but consumption and...
-
1. Let f(x) = 2x+6 if x < -1 3x+2 if x -1 (a) What is lim, -1- f(x)? Your answer will depend on b. (b) What is lim,-1+ f(x)? (c) For what values of b does limx-1 f(x) exist? 2. Suppose that f and g...
-
What factors should the CEO of a corporation consider in offering to pay victims damages prior to the end of a trial?
-
The State of Florida reported that the average unemployment benefit for people who were unemployed as the result of damage done by Hurricane Charley was $ 224 (source: floridajobs.org). You take a...
-
21.15A A company estimates the following net cash inflows and outflows for a capital investment project that is currently under consideration; Time 0 1 2 3 4 5 000 (1 650 000) 480 000 450 000 390 000...
-
Briefly describe some of the similarities and differences between U.S. GAAP and iGAAP with respect to the accounting for intangible assets .
-
The following are the hypothetical transactions that took place between the US and UK during 2006. 1. A US resident imports $500 worth of merchandise from a UK resident and agrees to pay in three...
-
One hundred mol/min of an equimolar mixture of 1-propanol (1) + 2 propanol (2) at 75C and 200 kPa is sent to flash distillation unit operating at 75C and 55 kPa. What is the resulting composition and...
-
One hundred mol/min of an equimolar mixture of 1-propanol (1) + 2-propanol (2) at 75C and 200 kPa is sent to flash distillation unit operating at 75C and 75 kPa. What is the resulting composition and...
-
Describe and briefly explain the main stages of a business-to-consumer (B2C) e-commerce transaction.
-
42. Explain why the inequality x - x + 1 < 0 has the empty set as the solution set.
-
Given the following memory status below, compute how much does it cost to compact holes together with the following compaction strategies if 1 kbyte of movement costs 50 centavos. 0. OS OS OS OS OS...
-
ITG Pte Ltd ("ITG") is a company specialising in air-conditioner maintenance and servicing. It makes adjusting and closing entries every 31 December, which is the company's financial year-end. Unless...
-
(20 points) We know that when we have a graph with negative edge costs, Dijkstra's algo rithm is not guaranteed to work. (a) Does Dijkstra's algorithm ever work when some of the edge costs are...
-
Create a new user called cis605_usr. Use Master. assign a password of abcd, set check_policy to off and check_expiration to off (Why set these two to off?). Execute the sp_addsrvrolemember to add the...
-
Show that, for SHM, the maximum displacement, velocity, and acceleration are related by v2m = amA?
-
An investor sells a European call on a share for $4. The stock price is $47 and the strike price is $50. Under what circumstances does the investor make a profit? Under what circumstances will the...
-
How many bits per baud can we send in each of the following cases if the signal constellation has one of the following number of points? a. 2 b. 4 c. 16 d. 1024
-
Define constellation diagram and explain its role in analog transmission.
-
Draw the constellation diagram for the following cases. Find the peak amplitude value for each case and define the type of modulation (ASK, FSK, PSK, or QAM).The numbers in parentheses define the...
-
XYZ Inc. is a manufacturer of specialized equipment which offers a leasing alternative. Provide journal entries in the books of lessor. The data relative to a typical lease are as follows: 1. The...
-
Inventory information for Part 311 of Sunland Corp. discloses the following information for the month of June. June 1 Balance 303 units @ $14 June 10 Sold 203 units @ $33 11 Purchased 796 units @ $17...
-
--- Direct labor....... ....... 10/unit - Direct material........... $17/unit -- Manufacturing overheads (fixed) ............ $969840/year Manufacturing overheads (variable)............ $4/unit --...
Study smarter with the SolutionInn App