Advertisement
dllbridge

Untitled

Apr 19th, 2025
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.03 KB | None | 0 0
  1.  
  2. format  PE console
  3. entry   start
  4. include 'win32ax.inc'
  5. include 'api\kernel32.inc'
  6.  
  7.  
  8.  
  9. ;------------------------------------------------             Создание переменных:
  10. section '.data' data readable writeable
  11.  
  12.  
  13.            n     dd  99  ; Переменная n (4 байта)
  14.  
  15.     sz_Hello     db  'Hello world ! n = %d', 10, 10, 0
  16. ;------------------------------------------------                   Код программы:
  17. section '.code' code readable executable
  18.  
  19.  
  20.  
  21.  start:    mov eax,  65536
  22.            mov  ax,  4
  23.  
  24.  
  25.  
  26.  L_03 :    cinvoke  printf, <"eax = %3d ", 10, 0>, eax
  27.  
  28.  L_04 :    cinvoke  scanf, <"%d", 10, 0>, n
  29.            invoke   ExitProcess, 0
  30.  
  31.  
  32.  
  33. ;------------------------------------------------           Подключение библиотек:
  34. section '.idata' import data readable
  35. library kernel32, 'kernel32.dll',\
  36.         msvcrt,   'msvcrt.dll'
  37.  
  38. import msvcrt,\
  39.        printf, 'printf',\
  40.        scanf,  'scanf'
  41.  
  42.  
  43.                      
  44.                      
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement