.386 
.model flat,stdcall 
option casemap:none 

include		windows.inc 
include		user32.inc 
include		kernel32.inc 
includelib	user32.lib 
includelib	kernel32.lib 

DlgProc		proto		:DWORD,:DWORD,:DWORD,:DWORD 

.data 
Message		db		"Hello World!",0 

.data? 
hInstance	HINSTANCE	?  

.code 
start: 
    invoke GetModuleHandle, NULL 
    mov    hInstance,eax 
    invoke DialogBoxParam, hInstance, 1001, NULL, addr DlgProc, NULL 
    invoke ExitProcess,eax 
    
DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM 
	.if uMsg == WM_COMMAND
		mov	eax,wParam
		.if eax==1003 
			invoke SetDlgItemText,hWnd,1002,ADDR Message 
		.elseif eax==1004 
			invoke	SendMessage, hWnd, WM_CLOSE, 0, 0
		.endif
	.elseif	uMsg == WM_CLOSE
		invoke	EndDialog, hWnd, 0
	.endif
        
    xor	eax,eax
    ret 
DlgProc endp 

end start