Part 1 Tasks:In a written document, answer the following questions in relationship to the topics covered by this unit:
Part 2 Tasks:The Assembly code compilation may be challenging, but the program has to be saved and submitted through a Notepad++ document. You can download notepad++ if you do not have a current copy.Click here to download the Notepad++ software. After you download the Notepad++ editor, type in your code and save it. Then it can be copied and pasted and run in an online compiler.Clickhereto compile and execute assembly code.1.Compile and execute the existing Assembly code on the left side of the screen. The following is the code that should be displayed: (Complineonline, n.d.)section .text ; This must be here to tell the compiler; where Program’s instructions startglobal _start ; Must be declared for using gcc_start: ; Tell linker entry pointmov edx, len ; Message lengthmov ecx, msg ; Message to writemov ebx, 1 ; File descriptor (stdout)mov eax, 4 ; System call number (sys_write)int 0x80 ; Call the kernelmov eax, 1 ; System call number (sys_exit)int 0x80 ; Call the kernelsection .data ; This must be here to tell the compiler; where Program’s data startsmsg db 'Hello, world!',0xa ; Our dear stringlen equ $ - msg ; Length of our dear stringWhen you click on the compile and execute button, the following results in the right screen will display:Compiling main.asm source code....$nasm -f elf main.asm 2>&1Linking the program....$ld -m elf_i386 -s -o demo *.o 2>&1Executing the program....$demoHello, world!2. Modify the code to display the following four lines:Hello, world!CE 242 is an awesome and fun class!CTU is a great University!I love the USA!
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here