Computer Systems: A Programmer's Perspective (3rd Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
Expert Solution & Answer
Book Icon
Chapter 7.7, Problem 7.4PP

A.

Explanation of Solution

Hex address of the relocated reference to “sum”:

From the given Figure 7.12(a), the function “sum” in line 5 is

4004de: e8 05 00 00 00callq 4004e8 <sum>sum()

From the given Figure 7.12(a), the value of “ADDR(s)”, “ADDR(r.symbol)” and “r.addend” is given below

ADDR(s)=ADDR(.text)=0x4004d0

r.offset=0xf

r.addend=-4

Now calculate the reference address for given line using the below formula.

refaddr=ADDR(s)+r

B.

Explanation of Solution

Hex value of the relocated reference to “sum”:

From the given Figure 7.12(a), the function “sum” in line 5 is

4004de: e8 05 00 00 00callq 4004e8 <sum>sum()

From the given Figure 7.12(a), the value of “ADDR(s)”, “ADDR(r.symbol)” and “r.addend” is given below

ADDR(s)=ADDR(.text)=0x4004d0

r.offset=0xf

r.addend=-4

Now calculate the reference address for given line using the below formula.

refaddr=ADDR(s)+r.offset

Then,

refaddr=ADDR(s)+r

Blurred answer
Students have asked these similar questions
(c) An electronic rainfall depth measurement device is developed to collect the data from the past 7 days as shown in Table 1 to study the weather condition at UniMAP. Table 1 [Jadual 1] Location: UniMAP Day Rainfall Depth (mm) 5.9 1 2 6.7 3 2.4 7.8 5.2 4 5 1.8 7 3.5 (i) Write a program in C to receive the values of rainfall depth and display the number of days with light rain ( 7.6 mm) from the record in Table 1. (ii) Rewrite the program in (c)(i) to identify and display the day with the lowest value of rainfall depth, the day with the highest value of rainfall depth and the average value of rainfall depth for the past 7 days.
Course: ((computer architecture)) Problem: Memory:   Given a 16Kx4 ROM memory chip; 1. What is the size of this ROM in Bytes?   2. Assuming the need to have one Control pin, one VCC and one VSS, Draw the smallest (i.e. number of pins) DIP package required to package this chip showing all pins with proper naming and directions.
Practice Problems (5) 1) Write a program to make a table of the physical properties for water in the range of temperatures from 273 to 323 K. The Density : The conductivity: K= 0.34 + 9.278 * 10* T The Specific heat: Cp= 0.015539 (T – 308.2)² + 4180.9 p= 1200.92 – 1.0056 T + 0.001084 T
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education