Question

Display your name following the message, "Hello World!". Submit either code or screen shot. %include "io.inc"...

Display your name following the message, "Hello World!". Submit either code or screen shot.

%include "io.inc"

section .data

msg db 'Hello, world! ', 0xa, 0 ;string to be printed

section .text

global CMAIN

CMAIN:

;write your code here

xor eax, eax

PRINT_STRING msg ;Display "Hello worlD!"

NEWLINE ;Add a new line

ret ;Return and stop

PreviousNext

Assembler

0 0
Add a comment Improve this question Transcribed image text
Answer #1
SYS_EXIT  equ 1
SYS_WRITE equ 4
STDIN     equ 0
STDOUT    equ 1
section  .text
   global _start    ;must be declared for using gcc
        
_start:             ;tell linker entry point
   mov eax, SYS_WRITE         
   mov ebx, STDOUT         
   mov ecx, msg1         
   mov edx, len1 
   int 0x80                
        
   mov eax, SYS_WRITE         
   mov ebx, STDOUT         
   mov ecx, msg2         
   mov edx, len2 
   int 0x80 
        
  mov eax,SYS_EXIT    ;system call number (sys_exit)
   int 0x80            ;call kernel

section  .data
msg1 db 'Your Name',0xA,0xD     
len1 equ $ - msg1                       

msg2 db 'Hello World!,', 0xA,0xD 
len2 equ $ - msg2 
Add a comment
Know the answer?
Add Answer to:
Display your name following the message, "Hello World!". Submit either code or screen shot. %include "io.inc"...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • JAVA Hello I am trying to add a menu to my Java code if someone can...

    JAVA Hello I am trying to add a menu to my Java code if someone can help me I would really appreacite it thank you. I found a java menu code but I dont know how to incorporate it to my code this is the java menu code that i found. import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ButtonGroup; import javax.swing.JCheckBoxMenuItem; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JRadioButtonMenuItem; public class MenuExp extends JFrame { public MenuExp() { setTitle("Menu Example");...

  • I am really struggling with this assignment, can anyone help? It is supposed to work with...

    I am really struggling with this assignment, can anyone help? It is supposed to work with two files, one that contains this data: 5 Christine Kim # 30.00 3 1 15 Ray Allrich # 10.25 0 0 16 Adrian Bailey # 12.50 0 0 17 Juan Gonzales # 30.00 1 1 18 J. P. Morgan # 8.95 0 0 22 Cindy Burke # 15.00 1 0 and another that contains this data: 5 40.0 15 42.0 16 40.0 17 41.5...

  • The following are screen grabs of the provided files Thanks so much for your help, and have a n...

    The following are screen grabs of the provided files Thanks so much for your help, and have a nice day! My Java Programming Teacher Gave me this for practice before the exam, butI can't get it to work, and I need a working version to discuss with my teacher ASAP, and I would like to sleep at some point before the exam. Please Help TEST QUESTION 5: Tamagotchi For this question, you will write a number of classes that you...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT