Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .686
- .model flat
- extern _ExitProcess@4 : PROC
- extern _MessageBoxA@16 : PROC
- extern _MessageBoxW@16 : PROC
- public _main
- .data
- ; tutaj deklaracje zmiennych
- output dw 256 dup(0)
- input dw 'a','b','c','d',0DEAFh,0DEAFh,'e','f',0DEAFh,0DEADh
- .code
- _main PROC
- ; tutaj kod programu sie zaczyna
- mov edx,OFFSET output
- mov esi,0
- mov ebx,0
- mov ecx,0
- mov eax,0
- wczytuj:
- mov ax,[input+2*ecx]
- cmp ax,0DEADh
- je koniec
- cmp ah,0
- ja dalej
- mov byte ptr [output+esi],al
- inc esi
- add bl,al
- dalej:
- inc ecx
- jmp wczytuj
- koniec:
- mov byte ptr [output+esi],bl
- ; zakonczenie programu
- push 0 ; kod powrotu programu
- call _ExitProcess@4
- _main ENDP
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement