Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.         .file "helloWorld2.c"
  3.         .section .rodata
  4. .LC0:
  5.         .string "Hello World.\n" #constant data
  6.         .text
  7. .global main
  8.         .type main, @function
  9. main:
  10.         pushq %rbp
  11.         movq %rsp, %rbp
  12.         movl $13, %edx          #length of the string
  13.         movl $.LC0, %esi        #use this memory location for the string
  14.         movl $1, %edi           #Write to screen flag 1
  15.         call write
  16.         movl $0, %eax           #return 0
  17.         leave                   #quick way to push rsp to rbp and pop the base pointer
  18.         ret                     #return to the calling function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement