Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .section .data
- .global op1
- .global op2
- .section .text
- .global function1 # int function1()
- function1:
- # prologue
- pushl %ebp
- movl %esp, %ebp
- movl op1, %ebp
- movl op1, %ebp
- movl op2, %ebp
- movl %ebp, %eax
- cmpl %ebp, %eax
- jne condition
- movl %ebp, %eax
- subl %ebp, %eax
- movl %eax, %ebp
- jmp final
- condition:
- movl %ebp, %edx
- movl %ebp, %eax
- addl %edx, %eax
- movl %eax, %ebp
- final:
- # epilogue
- movl %ebp, %esp
- popl %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement