Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. %include "io.inc"
  2.  
  3. section .text
  4. global CMAIN
  5. CMAIN:
  6. mov ebp, esp; for correct debugging
  7. lea ebx, [m]
  8. lea esi, [m]
  9. add esi, len-1
  10. xor eax, eax
  11. xor ecx, ecx
  12. xor edx, edx
  13. mov al, 32
  14. mov ah, 9
  15. mov ecx, 3
  16. call zamena
  17. ret
  18. zamena:cmp [ebx], ch
  19. je end
  20. cmp al, [ebx]
  21. jne dalshe
  22. cmp al, [ebx+1]
  23. jne dalshe
  24. cmp al, [ebx]
  25. jne dalshe
  26. uvelicheniestroki:push esi
  27. peredvizhenie:cmp esi, ebx
  28. je konecperedvizheniya
  29. mov dl, [esi]
  30. mov [esi+2], dl
  31. dec esi
  32. jmp peredvizhenie
  33. konecperedvizheniya:pop esi
  34. add esi, 2
  35. push ecx
  36. izmenenie:mov [ebx], ah
  37. inc ebx
  38. loop izmenenie
  39. pop ecx
  40. jmp zamena
  41. dalshe: inc ebx
  42. jmp zamena
  43. end:
  44. PRINT_STRING [m]
  45. ret
  46. section .Data
  47. m db " 1k qq kanec", 0
  48. str1 db "Hi. It's me.", 0
  49. len equ $-m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement