Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. ; Przykład wywoływania funkcji MessageBoxA i MessageBoxW
  2. .686
  3. .model flat
  4. extern _ExitProcess@4 : PROC
  5. extern _MessageBoxA@16 : PROC
  6. extern _MessageBoxW@16 : PROC
  7. public _main
  8. .data
  9.  
  10. tytul_Unicode dw 'T','e','k','s','t',' ','w',' '
  11. dw 'f','o','r','m','a','c','i','e',' '
  12. dw 'U','T','F','-','1','6', 0
  13. tekst_Unicode dw 'K','a',017CH,'d','y',' ','z','n','a','k',' '
  14. dw 'z','a','j','m','u','j','e',' '
  15. dw '1','6',' ','b','i','t',00F3H,'w', 0
  16.  
  17. tytul_Win1250 db 'Tekst w standardzie Windows 1250', 0
  18. tekst_Win1250 db 'Ka', 0BFH, 'dy znak zajmuje 8 bit', 0F3H, 'w', 0
  19.  
  20. tytul_Unicode2 dw 'Z','n','a','k','i', 0
  21. tekst_Unicode2 dw 'T','o',' ','j','e','s','t',' ','p','i','e','s',' ',0D83DH,0DC15H,' ','i',' ','k','o','t',' ',0D83DH,0DC08H, 0
  22.  
  23. .code
  24. _main PROC
  25. push 0 ; stała MB_OK
  26. ; adres obszaru zawierającego tytuł
  27. push OFFSET tytul_Win1250
  28. ; adres obszaru zawierającego tekst
  29. push OFFSET tekst_Win1250
  30. push 0 ; NULL
  31. call _MessageBoxA@16
  32.  
  33. push 0 ; stala MB_OK
  34. ; adres obszaru zawierającego tytuł
  35. push OFFSET tytul_Unicode
  36. ; adres obszaru zawierającego tekst
  37. push OFFSET tekst_Unicode
  38. push 0 ; NULL
  39. call _MessageBoxW@16
  40.  
  41. push 0 ; stala MB_OK
  42. ; adres obszaru zawierającego tytuł
  43. push OFFSET tytul_Unicode2
  44. ; adres obszaru zawierającego tekst
  45. push OFFSET tekst_Unicode2
  46. push 0 ; NULL
  47. call _MessageBoxW@16
  48.  
  49. push 0 ; kod powrotu programu
  50. call _ExitProcess@4
  51. _main ENDP
  52. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement