Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. .686
  2. .model flat
  3. extern _ExitProcess@4 : PROC
  4. extern _MessageBoxA@16 : PROC
  5. extern _MessageBoxW@16 : PROC
  6. public _main
  7. .data
  8. ; tutaj deklaracje zmiennych
  9. output dw 256 dup(0)
  10. input dw 'a','b','c','d',0DEAFh,0DEAFh,'e','f',0DEAFh,0DEADh
  11. .code
  12. _main PROC
  13. ; tutaj kod programu sie zaczyna
  14.  
  15. mov edx,OFFSET output
  16.  
  17. mov esi,0
  18. mov ebx,0
  19. mov ecx,0
  20. mov eax,0
  21.  
  22. wczytuj:
  23. mov ax,[input+2*ecx]
  24. cmp ax,0DEADh
  25. je koniec
  26. cmp ah,0
  27. ja dalej
  28. mov byte ptr [output+esi],al
  29. inc esi
  30. add bl,al
  31. dalej:
  32. inc ecx
  33. jmp wczytuj
  34. koniec:
  35. mov byte ptr [output+esi],bl
  36.  
  37.  
  38.  
  39. ; zakonczenie programu
  40. push 0 ; kod powrotu programu
  41. call _ExitProcess@4
  42. _main ENDP
  43. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement