Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text
- .global minmax
- minmax:
- pushl %ebp
- movl %esp, %ebp
- pushl %edi
- pushl %esi
- movl (%eax), %edi
- movl (%eax), %esi
- loop:
- cmpl (%eax), %edi
- cmovl (%eax), %edi
- cmpl (%eax), %esi
- cmovg (%eax), %esi
- addl $4, %eax
- subl $1, %edx
- testl %edx, %edx
- je ep
- jmp loop
- ep:
- movl %edi, %eax
- movl %esi, %edx
- popl %esi
- popl %edi
- movl %ebp, %esp
- popl %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement