Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         .text
  2.         .global minmax
  3.  
  4. minmax:
  5.         pushl   %ebp
  6.         movl    %esp, %ebp
  7.         pushl   %edi
  8.         pushl   %esi
  9.         movl    (%eax), %edi
  10.         movl    (%eax), %esi
  11.  
  12. loop:
  13.         cmpl    (%eax), %edi
  14.         cmovl   (%eax), %edi
  15.         cmpl    (%eax), %esi
  16.         cmovg   (%eax), %esi
  17.         addl    $4, %eax
  18.         subl    $1, %edx
  19.         testl   %edx, %edx
  20.         je      ep
  21.         jmp     loop
  22.  
  23. ep:
  24.         movl    %edi, %eax
  25.         movl    %esi, %edx
  26.         popl    %esi
  27.         popl    %edi
  28.         movl    %ebp, %esp
  29.         popl    %ebp
  30.         ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement