MASM32 is a joke because of the fact there are excessive macros, like '.IF' and '.ENDIF', oh, and that dastardly 'print'.
Code:
bits 32
extern _GetStdHandle@4
extern _WriteFile@20
extern _ExitProcess@4
STD_OUTPUT_HANDLE equ 0xFFFFFFFB
NULL equ 0
EXIT_SUCCESS equ 0
segment .data
OUTPUT_MSG db "MASM32 is junk; NASM is clearly superior.",0x0A,0x0D," - ent",0x0A,0x0D
OUTPUT_MSG_LEN equ $ - OUTPUT_MSG
segment .text
push dword STD_OUTPUT_HANDLE
call _GetStdHandle@4
push dword NULL
push dword NULL
push dword OUTPUT_MSG_LEN
push dword OUTPUT_MSG
push dword eax
call _WriteFile@20
push dword EXIT_SUCCESS
call _ExitProcess@4
Code:
nasm -fwin32 -omsgbox msgbox.asm
ld -lkernel32 -luser32 -omsgbox msgbox.o