Question: 2. Write the following code and show in the debugger the stack and machine code for the instructions. Show how call and ret instructions work

2. Write the following code and show in the debugger the stack and machine code for the instructions. Show how call and ret instructions work using the values in stack.

2. Write the following code and show in the debugger the stack

section .data .section .text global start start: hop movl $5, %eax movl $7, %ebx call findSum add %eax, %ebx movl $1, %eax movl $0, %ebx int $0x80 findSum: pushl %eax pushl %ebx movl $0x40, %eax movl $0x50, %ebx add %eax, %ebx popl %ebx popl %eax ret

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!