If the value of ESP register before running line number 9 is 2000. What will be its value at line 15? Note that the "sum' function is defined in the second picture below. 22 extern sum, print_sint, print_uint, print_hex global main segment .text main: push 1 push-2 call sum add esp, 8 push eax call print_sint call print_uint call print_hex add esp, 4 mov eax, 1 int 0x80 #include int sum(int a, int b) { return a+b; } void print_sint(int a) { printf("%d\n", a); } void print_uint(int a) { printf("%u\n", a); } void print_hex(int a) { printf("%x\n", a); } A. 1996 B. 2012 C. 1988 D. 2008

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.4: A Case Study: Rectangular To Polar Coordinate Conversion
Problem 9E: (Numerical) Write a program that tests the effectiveness of the rand() library function. Start by...
icon
Related questions
Question
If the value of ESP register before running line number 9 is 2000. What will be its value at line 15? Note that the "sum"
function is defined in the second picture below.
extern sum, print_sint, print_uint, print_hex
global main
segment .text
main:
push 1
push-2
call sum
add esp, 8
push eax
call print_sint
call print_uint
call print_hex
add esp, 4
Imov eax, 1
int 0x80
#include <stdio.h>
int sum(int a, int b) {
return a+b;
}
void print_sint(int a) {
printf("%d\n", a);
}
void print_uint (int a) {
printf("%u\n", a);
void print_hex(int a) {
printf("%x\n", a);
}
A. 1996
B. 2012
C. 1988
D. 2008
Transcribed Image Text:If the value of ESP register before running line number 9 is 2000. What will be its value at line 15? Note that the "sum" function is defined in the second picture below. extern sum, print_sint, print_uint, print_hex global main segment .text main: push 1 push-2 call sum add esp, 8 push eax call print_sint call print_uint call print_hex add esp, 4 Imov eax, 1 int 0x80 #include <stdio.h> int sum(int a, int b) { return a+b; } void print_sint(int a) { printf("%d\n", a); } void print_uint (int a) { printf("%u\n", a); void print_hex(int a) { printf("%x\n", a); } A. 1996 B. 2012 C. 1988 D. 2008
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr