Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. function_label:
  2. pushl %ebp
  3. movl %esp, %ebp
  4. < normal function code goes here>
  5. movl %ebp, %esp
  6. popl %ebp
  7. ret
  8.  
  9. .section .data
  10. message:
  11. .asciz "> Hello from function #%dn"
  12.  
  13. .section .text
  14. .globl main
  15.  
  16. main:
  17. nop
  18. call overhere
  19. pushl $0
  20. call exit
  21. overhere:
  22. pushl %ebp
  23. movl %esp, %ebp
  24. pushl $1
  25. pushl $message
  26. call printf
  27. add $8, %esp
  28. movl %ebp, %esp
  29. popl %ebp
  30. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement