Advertisement
krot

сборка

Sep 16th, 2016
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. set path=\masm32\bin
  3. set lib=\masm32\lib
  4. set name=SOFT
  5. ml.exe /c /coff "%name%".asm
  6. link.exe /SUBSYSTEM:WINDOWS /opt:nowin98 /LIBPATH:"%lib%" "%name%".obj
  7. del *.OBJ
  8. pause
  9. @echo on
  10. cls
  11. ...................................................
  12. .386
  13. .model flat, stdcall
  14. option casemap :none   ; case sensitive
  15.  
  16. ; ---- Include ------------------------------------------------------------
  17. include \masm32\include\windows.inc
  18. include \masm32\include\user32.inc
  19. include \masm32\include\kernel32.inc
  20. include \masm32\include\ntdll.inc
  21. include \masm32\include\shell32.inc
  22. include \masm32\macros\macros.asm
  23.  
  24. includelib \masm32\lib\shell32.lib
  25. includelib \masm32\lib\user32.lib
  26. includelib \masm32\lib\kernel32.lib
  27. includelib \masm32\lib\ntdll.lib
  28.  
  29. ; ---- Initialized data ---------------------------------------------------
  30. .data
  31. errorm db "error",0
  32. message db "msg",0;переменная с сообщением
  33. msgtitle db "TITLE",0 ;переменная с заголовком
  34. .data?
  35. buffer db 128 dup(?)
  36.  
  37. ; ---- Code ---------------------------------------------------------------
  38. .code
  39. start:
  40. mov eax,[offset message+3]
  41. cmp BYTE PTR DS:[EAX],00h
  42. jnz err
  43. invoke MessageBox,0,offset message,offset msgtitle,MB_OK ;выводим сообщение
  44. jmp finish
  45. err:invoke MessageBox,0,offset errorm,offset errorm,MB_OK ;выводим сообщение
  46. finish:
  47.     invoke ExitProcess,0
  48. end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement