ASM-TRAINING/hellosailor/hello.asm

24 lines
526 B
NASM

; Выведет 'Hello, Sailor!' и тут же завершится
format PE
entry start
include '%FASMINC%\WIN32A.INC'
section '.data' data readable writeable
message db 'Hello, Sailor!!', 0
section '.code' code readable executable
start:
invoke printf, message
invoke ExitProcess, 0
section '.idata' import data readable
library \
msvcrt, 'msvcrt.dll', \
kernel32, 'kernel32.dll'
import msvcrt, \
printf, 'printf'
import kernel32, \
ExitProcess, 'ExitProcess'