Seems a problem with the setting up of your editor.....
Try this
Code:
.386
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
WinMain proto :DWORD,:DWORD,:DWORD,:DWORD
; -------------------------------
; literal string MACRO
; -------------------------------
literal MACRO quoted_text:VARARG
LOCAL local_text
.data
local_text db quoted_text,0
.code
EXITM <local_text>
ENDM
; --------------------------------
; string address in INVOKE format
; --------------------------------
SADD MACRO quoted_text:VARARG
EXITM <ADDR literal(quoted_text)>
ENDM
;#####################################################
;#####################################################
.DATA
;#####################################################
;#####################################################
.DATA?
hInstance HINSTANCE ?
CommandLine LPSTR ?
;#####################################################
;#####################################################
; STARTUP
.CODE
start:
invoke GetModuleHandle, NULL
mov hInstance,eax
invoke GetCommandLine
mov CommandLine,eax
invoke WinMain, hInstance,NULL,CommandLine, SW_SHOWDEFAULT
invoke ExitProcess, eax
;#####################################################
;#####################################################
WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD
invoke MessageBoxA, NULL,SADD("From MASM"),SADD("Hello World"),MB_OK
mov eax,NULL
ret
WinMain endp
end start
Save as Hello.asm......
Now open a command prompt and direct it to the folder in which this file resides. Type this
C:\masm32\BIN\ML.EXE /c /coff /Cp Hello.asm
Assuming ML is indeed in C:\masm32\BIN (this is the default install folder anyway)
Now this should exit and in the folder, you will find a new file called Hello.obj. Now type
C:\masm32\BIN\LINK.EXE /SUBSYSTEM:WINDOWS /LIBPATH:c:\masm32\lib Hello
Again I'm assuming the lib folder and bin folder are in those places...if not, change the paths
This should now produce Hello.exe....run it and see