Advertisement
Guest User

Untitled

a guest
Jan 28th, 2017
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .data
  2. s:         .asciz  "%llu\n"
  3. .text
  4. .global process
  5.  
  6. process:
  7.     pushl   %ebp
  8.     movl    %esp, %ebp
  9.     pushl   %ebx
  10.     pushl   %edi
  11.     pushl   %esi
  12.  
  13.     movl    A, %eax
  14.     movl    B, %ebx
  15.     movl    C, %ecx
  16.  
  17.     cmpl    %ebx, %eax
  18.     jg     end1
  19.     movl    %ebx, %edx
  20.     movl    %eax, %ebx
  21.     movl    %edx, %eax
  22. end1:
  23.     cmpl    %ecx, %eax
  24.     jg     end2
  25.     movl    %ecx, %edx
  26.     movl    %eax, %ecx
  27.     movl    %edx, %eax
  28. end2:
  29.     cmpl    %ebx, %ecx
  30.     jg     end3
  31.     movl    %ebx, %edx
  32.     movl    %ecx, %ebx
  33.     movl    %edx, %ecx
  34. end3:
  35.     movl    %ecx, %eax
  36.  
  37.     popl    %esi
  38.     popl    %edi
  39.     popl    %ebx
  40.     popl    %ebp
  41.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement