Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 4: Arguments and Variables (25%) Answer the questions beside each of the following three codes (some lines of code might be omitted, answer the
Problem 4: Arguments and Variables (25%) Answer the questions beside each of the following three codes (some lines of code might be omitted, answer the questions based on the visible portions of code and assume all local variables and arguments are of the DWORD type). a. sub_hw PROC push ebp mov ebp, esp sub esp, 16 How many local variables in sub_hw? How many arguments for sub_hw? mov eax, [ebp+16] add eax, [ebp-4] add eax, (ebp+12] add eax, [ebp+8] pop ebp ret sub hw endp b. sub_hw PROC How many local variables in sub_hw? mov eax, [ebp+8] add ebx, [ebp-8] add eax, [ebp-12] mov [ebp-4], eax How many arguments for sub_hw? pop ebp ret 8 sub_hw endp C. main PROC How many local variables in sub_hw? call sub_hw add esp, 36 main endp How many arguments for sub_hw? subhw PROC push ebp mov ebp, esp sub esp, 20 mov ebx, [ebp+12] mov [ebp-4], eax pop ebp ret sub_hw endp
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