Question: You are given the following Intel assembly program. Give the contents of the EAX, EBX, ECX, EDX, EBP, ESP registers and the stack at the
You are given the following Intel assembly program. Give the contents of the EAX, EBX, ECX, EDX, EBP, ESP registers and the stack at the locations in the program marked as BP BP BP BP BP and BP
Use the excel table provided to you. For each BPx write in the appropriate cells. The contents for BP are given. Remember to mark where the current esp is pointing to as shown in the example BP Also when writing the contents of the esp register, use the adresses in terms of esp eg like esp or esp etc
segment data
n dd
n dd
segment bss
buffer resb
segment text
global start
start:
; BP
push dword n
push dword n
; BP
call mymult
add esp,
mov result eax
; BP
push dword result
call myprintint
add esp,
;exit
mov eax,
mov ebx,
int h
mymult:
push ebp
mov ebp,esp
; BP
mov eax,ebp
mov ebx,ebp
; BP
mul ebx
; BP
pop ebp
; BP
ret
;Assume the subroutine for printing an integer is below
myprintint:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
