Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. BubbleSort PROC USES eax ecx esi,
  2.     Names:PTR DWORD , Marks:PTR DWORD ,Count:DWORD
  3.     mov  ecx,Count
  4.     dec  ecx    
  5. L1: push ecx  
  6.     mov  ebx,Names
  7.     mov  esi,Marks
  8. L2: mov  eax,[esi]
  9.     cmp  [esi+4],eax
  10.     jge  L3
  11.     xchg ebx,[esi+4]  
  12.     xchg eax,[esi+4]
  13.     mov  [esi],eax
  14. L3: add  esi,4
  15.     add  ebx,4
  16.     loop L2
  17.     pop  ecx
  18.     loop L1
  19. L4: ret
  20. BubbleSort ENDP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement