Question: Re-write helloWorld.asm below as well as compile it. Then debug the program to answer the following questions: 1. Find memory addresses contain the programs environment
Re-write "helloWorld.asm" below as well as compile it. Then debug the program to answer the following questions:
1. Find memory addresses contain the programs environment strings. Additionally, what memory address contains the programs arguments?
2. Debug the program and stop it immediately before the syscall for write, then find the followings: - Find the current ESP. - Find the current EBP. - Find the current EIP.
3. Where is the message located?
4. State the return value for the write syscall, and where it is located.
-----------------------------------------------------------------
helloWorld.asm
*******************
extern printf;
section .data;
msg db "Hello world", 0xa, 0;
section .text
global main;
main:
push msg;
call printf;
add esp, byte 4;
return:
move eax, 0
ret;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
