Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. .section .data
  2. .global op1
  3. .global op2
  4.  
  5. .section .text
  6. .global function1 # int function1()
  7.  
  8. function1:
  9.  
  10. # prologue
  11. pushl %ebp
  12. movl %esp, %ebp
  13.  
  14. movl op1, %ebp
  15. movl op1, %ebp
  16. movl op2, %ebp
  17. movl %ebp, %eax
  18. cmpl %ebp, %eax
  19. jne condition
  20.  
  21. movl %ebp, %eax
  22. subl %ebp, %eax
  23. movl %eax, %ebp
  24. jmp final
  25.  
  26. condition:
  27. movl %ebp, %edx
  28. movl %ebp, %eax
  29. addl %edx, %eax
  30. movl %eax, %ebp
  31.  
  32. final:
  33. # epilogue
  34. movl %ebp, %esp
  35. popl %ebp
  36. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement