Question: MASM Create a new project and copy and paste the following code into main.asm. INCLUDE Irvine32.inc .data word1 WORD 10 word2 WORD 20 .code main

MASM

Create a new project and copy and paste the following code into main.asm.

INCLUDE Irvine32.inc

.data

word1 WORD 10

word2 WORD 20

.code

main PROC

movzx eax,word1

push eax

movzx eax,word2

push eax

call AddTwoArgs

call WriteInt

exit

main ENDP

AddTwoArgs PROC

; Adds two integers, returns sum in EAX.

push ebp ; save stack base pointer

mov ebp,esp ; copy current stack pointer to base

mov eax,[ebp + 12] ; first parameter

add eax,[ebp + 8] ; second parameter

pop ebp ; restore base pointer

ret 8 ; clean up the stack

AddTwoArgs ENDP

END main

At the add eax, [ebp+8] instruction what values are on the stack. Complete the following table.

Displacement

Value Address

+0

+4

+8

+12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!