Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %include "io.inc"
- section .text
- global CMAIN
- CMAIN:
- mov ebp, esp; for correct debugging
- lea ebx, [m]
- lea esi, [m]
- add esi, len-1
- xor eax, eax
- xor ecx, ecx
- xor edx, edx
- mov al, 32
- mov ah, 9
- mov ecx, 3
- call zamena
- ret
- zamena:cmp [ebx], ch
- je end
- cmp al, [ebx]
- jne dalshe
- cmp al, [ebx+1]
- jne dalshe
- cmp al, [ebx]
- jne dalshe
- uvelicheniestroki:push esi
- peredvizhenie:cmp esi, ebx
- je konecperedvizheniya
- mov dl, [esi]
- mov [esi+2], dl
- dec esi
- jmp peredvizhenie
- konecperedvizheniya:pop esi
- add esi, 2
- push ecx
- izmenenie:mov [ebx], ah
- inc ebx
- loop izmenenie
- pop ecx
- jmp zamena
- dalshe: inc ebx
- jmp zamena
- end:
- PRINT_STRING [m]
- ret
- section .Data
- m db " 1k qq kanec", 0
- str1 db "Hi. It's me.", 0
- len equ $-m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement