Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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