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
- extern __write : PROC ; (int handle, char * text, int length)
- extern __read : PROC ; (int handle, char * text, int lengthLimit)
- public _main
- .data
- obszar db 12 dup (?)
- dziesiec dd 10 ; mnożnik
- znaki byte 12 dup (?)
- const2 db ?
- slowo1 db 'kotek',0
- slowo2 db 'kot',0
- .code
- porownaj PROC
- mov eax, 0
- mov ebx, 0
- sprawdzaj:
- mov al, [esi]
- mov bl, [edi]
- cmp al, 0
- je sprawdz_krotszyb
- cmp bl,0
- je sprawdz_krotszya
- inc esi
- inc edi
- cmp al, bl
- je sprawdzaj
- cmp al, bl
- jb a_wczesniej
- jmp b_wczesniej
- sprawdz_krotszyb:
- cmp bl,0
- je takie_same
- jmp a_wczesniej
- sprawdz_krotszya:
- cmp al,0
- je takie_same
- jmp b_wczesniej
- a_wczesniej:
- CLC
- jmp dalej
- b_wczesniej:
- cmp bl, al
- STC
- jmp dalej
- takie_same:
- CLC
- dalej:
- ret
- porownaj ENDP
- _main:
- mov esi, OFFSET slowo1
- mov edi, OFFSET slowo2
- call porownaj
- push 0
- call _ExitProcess@4
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement