Question
16. In which one of the 3 types of memory are static variables stored? ( heap, stack, program ) 17. There are two things the
16. In which one of the 3 types of memory are static variables stored? ( heap, stack, program )
17. There are two things the NOP instruction accomplishes while doing nothing what are they?
18. Given that cl=0x9F, what is the minimum value that when subtracted, would set the OVERFLOW flag?
19. Afterwards, what is the value of the SIGN flag?
20. What is the difference between a compare instruction and a subtract instruction? _______
Short Answer (50 pts)
21. (6 pts) Given the memory shown below and esp = 0x12F458. What is value of eax after executing a pop
eax instruction? What is esp after executing the pop instruction?
0012F454 FE CA B0 CA AD BE CE D1 eax = __________ esp = __________
22. (19 pts) Given that [ ebp + 0x14 ] refers to a parameter named tmpi = 0x9FEC5, ebp = esp = 0x19000.
CODE A: CODE B: . lea ecx, [ebp + 0x14] vs. mov ecx, [ebp + 0x14] push ecx push ecx call func1 call func1
a. (5 pts) Briefly describe the difference between the CODE A instructions and the CODE B instructions.
b. (4 pts) For each one, show the value of ecx as it appears on the stack. Stack CODE A: CODE B: 0x18FFC 0x19000 Prior ebp Prior ebp
c. (5 pts) What is the stack address that will hold the return address when func1 is called?
d. (5 pts) At what address is tmpi stored?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started