ChrRaz

Original

Feb 5th, 2015
442
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. void main() {
  2.     __asm__ (
  3.             "movl $1, %eax;\n"  /* 1 is the syscall number for write */
  4.             "movl $1, %ebx;\n"  /* 1 is stdout and is the first argument */
  5.             "leal 16(%eip), %esi;\n"
  6.             "movl $13, %edx;\n"  /* third argument is the length of the string to print*/
  7.             "syscall;\n"
  8.             "movl $60,%eax;\n"
  9.             "xorl %ebx,%ebx; \n"
  10.             "syscall;\n"
  11.             "message: .ascii \"Hello World!\\n\";"
  12.             );
  13. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment