LordKusa

Ordenamiento en assembler

Nov 30th, 2020
40
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;inicialización de programa
  2. .model small
  3. .stack
  4. .code
  5.  
  6. mov di, 0Fh
  7.  
  8. forJ:
  9.  
  10. inc di
  11. mov si, di
  12.  
  13.  
  14. forI:
  15. inc si
  16.  
  17. mov bl, [si]
  18. mov al, [di]
  19.  
  20. cmp bl, al
  21. jae continuar
  22.  
  23. mov cl, al
  24. mov al, bl
  25. mov bl, cl
  26.  
  27. mov [si], bl
  28. mov [di], al
  29.  
  30. continuar:
  31. cmp si, 19h
  32. jne forI
  33.  
  34. cmp di, 18h
  35. jne forJ
  36.  
  37. ;fin de programa
  38. mov ah, 4ch
  39. int 21h
RAW Paste Data