I do it in this way (mingw, cygwin)...
1. Source code:
bits 32
extern _MessageBoxA@16
global entry
section .code
entry:
push byte 0
push msg
push caption
push byte 0
call dword _MessageBoxA@16
ret
msg db "hell", 0
caption db "message", 0
; ------
2. Makefile:
NAME=1
$(NAME).exe:$(NAME).obj
ld $(NAME).obj -o $(NAME).exe -e entry --subsystem windows -luser32
$(NAME).obj:$(NAME).asm
nasm $(NAME).asm -fwin32
run:$(NAME).exe
./$(NAME).exe
clean:
rm *.exe *.obj
; -----
3. Command line from msys or cygwin:
make run
; -----
You can write some macro to do it easy. We can help you.
-----
nmt