Answered step by step
Verified Expert Solution
Link Copied!

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 BP1, BP2, BP3, BP4, BP5 and BP6.
Use the excel table provided to you. For each BPx, write in the appropriate cells. The contents for BP0 are given. Remember to mark where the current esp is pointing to as shown in the example BP0. Also when writing the contents of the esp register, use the adresses in terms of esp0, e.g. like esp0-4 or esp0+4, etc
segment .data
n1 dd 7
n2 dd 10
segment .bss
buffer resb 16
segment .text
global _start
_start:
; BP0
push dword [n2]
push dword [n1]
; BP1
call my_mult
add esp,8
mov [result], eax
; BP6
push dword [result]
call my_print_int
add esp,4
;exit
mov eax,1
mov ebx,0
int 80h
my_mult:
push ebp
mov ebp,esp
; BP2
mov eax,[ebp+8]
mov ebx,[ebp+12]
; BP3
mul ebx
; BP4
pop ebp
; BP5
ret
;Assume the subroutine for printing an integer is below
my_print_int:
...
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Types of Interpersonal Relationships?

Answered: 1 week ago

Question

Self-Disclosure and Interpersonal Relationships?

Answered: 1 week ago