Simpler minimal version:
.486 ; create 32 bit code
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive
includelib kernel32.lib
ExitProcess proto : DWORD
GetStdHandle PROTO :DWORD
WriteFile PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
.data
msg db "PoAsm is great!",13,10,0
numw dd 0
.code
start:
invoke GetStdHandle, -11
invoke WriteFile, eax, addr msg, sizeof msg, addr numw, 0
invoke ExitProcess, 0
end start
When using debugger this one using PROC and ENDP works better:.486 ; create 32 bit code
.MODEL FLAT, STDCALL ; 32 bit memory model
OPTION CASEMAP :NONE ; case sensitive
INCLUDELIB kernel32.lib
ExitProcess PROTO :DWORD
GetStdHandle PROTO :DWORD
WriteFile PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
.data
msg db "PoAsm is great!",13,10,0
numw dd 0
.code
start PROC
INVOKE GetStdHandle, -11
INVOKE WriteFile, eax, ADDR msg, SIZEOF msg, ADDR numw, 0
INVOKE ExitProcess, 0
start ENDP
END start