; Assemble with:
; nasm -fobj msg.asm
; alink -subsys win -oPE msg.obj -o msg.exe
import LoadLibrary kernel32.dll LoadLibraryA
import GetProcAddress kernel32.dll
import ExitProcess kernel32.dll
extern LoadLibrary
extern GetProcAddress
extern ExitProcess
section code use32
..start
push dword user32
call [LoadLibrary]
push dword MessageBox
push eax
call [GetProcAddress]
push byte 0
push dword Hello
push dword Title
push byte 0
call eax
push byte 0
call [ExitProcess]
user32 db "user32", 0
MessageBox db "MessageBoxA", 0
Hello db "Hello friend", 0
Title db "Written in NASM", 0
-------------
nmt