Advertisement
Temas

Untitled

Oct 23rd, 2017
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %include "gt.asm"
  2. covar
  3. getal resd 5
  4. verberg resd 1
  5. vier dd 4
  6. inleiding
  7.     sub esi,esi
  8.     sub edi,edi
  9.     sub eax,eax
  10.     mov ecx, 5
  11.    
  12. lus:
  13.     inv [getal+esi]
  14.     add esi, [vier]
  15.     loop lus
  16.     mov ecx, [vier]
  17.    
  18. bubble:
  19.     mov [verberg], ecx
  20.     sub esi,esi
  21.     mov ecx, 4
  22.  
  23. vergelijk:
  24.     mov eax, [getal+esi]
  25.     cmp eax, [getal+esi+4]
  26.     jl verder
  27.  
  28.     mov edx, [getal+esi+4]
  29.     mov [getal+esi], edx
  30.     mov [getal+esi+4], eax
  31.    
  32. verder:
  33.     add esi, [vier]
  34.     loop vergelijk
  35.    
  36.     mov ecx, [verberg]
  37.     loop bubble
  38.     sub esi,esi
  39.     mov ecx, 5
  40.    
  41. out:
  42.     uit [getal+esi]
  43.     add esi, [vier]
  44.     loop out
  45. slot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement