hackercademy

Untitled

Dec 17th, 2013
125
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .data
  2.  
  3.     HelloWorld:
  4.         .asciz "Hello World!"
  5.  
  6.     CallDemo:
  7.         .asciz "Call works!"
  8.  
  9. .text
  10.  
  11.     .globl _start
  12.  
  13.     _start:
  14.         nop
  15.  
  16.         # Write  HelloWorld
  17.                 jmp ExitProgram
  18.         movl $4, %eax
  19.         movl $1, %ebx
  20.         movl $HelloWorld, %ecx
  21.         movl $12, %edx
  22.         int $0x80
  23.  
  24.  
  25.  
  26.    
  27.     ExitProgram:
  28.         # Exit the program
  29.         movl $1, %eax
  30.         movl $10, %ebx
  31.         int $0x80
  32.  
  33.     CallMe:
  34.         movl $4, %eax
  35.         movl $1, %ebx
  36.         movl $CallDemo, %ecx
  37.         movl $11, %edx
  38.         int $0x80
  39.         ret
RAW Paste Data