1. Engineering
  2. Computer Science
  3. this is very simple just change the string displayed in...

Question: this is very simple just change the string displayed in...

Question details

This is very simple, just change the string displayed in the ASM program below to be:

“Assignment 1 for your name.”

and perform a 2nd system call that outputs: “All done.”

This means that you little assembly program will do three system calls.

For “your name” in the above, use the name you want credit given for the assignment.

You may run the program on your PC if you have an assembler loaded on it. Otherwise, you can go out on the Internet to site https://www.tutorialspoint.com/compile_assembly_online.php (this is probably the example program there).

You are to use a screen shot to show the output for this assignment and this assignment only. Place a copy of your program and the screen shot showing your output in the drop box for assignment 1 on D2L.

section .text

              global _start             ;must be declared for using gcc

_start:                                     ;tell linker entry point

              mov      edx, len      ;message length

              mov      ecx, msg    ;message to write

              mov      ebx, 1       ;file descriptor (stdout)

              mov      eax, 4       ;system call number (sys_write)

              int         0x80           ;call kernel

              mov      eax, 1       ;system call number (sys_exit)

              int         0x80           ;call kernel

section .data

msg db             'Hello, world!‘            ;our dear string

len        equ       $ - msg       ;length of our dear string

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution