Question 1.
Initial State of Stack
0x1050 55
0x1054 57 <- ESP
0x1058 58
Execution of instruction
push 0x1050
step 1. (Increment Stack Pointer) ESP = ESP - 4 = 0x1054 - 0x4 = 0x1050
step 2. Store memory value of 0x1050 in new ESP location
step 3. So 0x1050 memory location is updated by it's value itself
Final State of Stack
0x1050 55 <- ESP
0x1054 57
0x1058 58
Question 2
Initial State of Stack
0x1050 55
0x1054 57 <- ESP
0x1058 58
Executing the instruction
pop eax
step 1. Store value of memory location pointed by ESP to register eax = 57
step 2. (Decrement Stack Pointer) ESP = ESP + 4 = 0x1054 + 0x4 = 0x1058
Final State of Stack
0x1050 55
0x1054 57
0x1058 58 <- ESP
eax = 57
Thank you! Hit like if you like my work.
Get Answers For Free
Most questions answered within 1 hours.