Prologue \ epilogue macros turned off :
.386
.model flat,stdcall
option casemap:none
MessageBoxA PROTO :DWORD,:DWORD,:DWORD,:DWORD
MessageBox EQU <MessageBoxA>
ExitProcess PROTO :DWORD
testproc PROTO :DWORD,:DWORD
MB_OK EQU 0
.data
capt db 'Hello',0
message db 'This is a test',0
.code
start:
invoke testproc,ADDR message,ADDR capt
invoke ExitProcess,0
OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE
testproc PROC _msg:DWORD,_title:DWORD
invoke MessageBox,0,DWORD PTR [esp+12],\
DWORD PTR [esp+12],MB_OK
retn 2*4
testproc ENDP
OPTION PROLOGUE:PrologueDef
OPTION EPILOGUE:EpilogueDef
END start
You need to specify the retn instruction instead of ret to balance manually the stack.