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 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:
...
 You are given the following Intel assembly program. Give the contents

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!