Hi,
On the link line you enter the filename as "hwmb.obj" yet ALINK throws an error on the name "helloworld". Is it possible that you are entering a longname which ALINK doesn't recognize ?
If you're committed to using ALINK then the following answer won't help.But if you want to use GOLINK the following code will work.
GOLINK can be found at :
http://www.jorgon.freeserve.co.uk/These are the assemble/link commands for NASM/GOLINK
;=============================
nasm -f win32 tester.asm -o tester.obj
golink.exe /entry:start tester.obj user32.dll
;=============================
The INCLUDE paths are, of course, valid only on my machine. You'll need to change them for your work.
Notice that the second INCLUDE is REMMed out because it requires a file (NASM32.INC) which will enable the INVOKE command. NASM32.INC is a file which comes with the NASM32 package from AsmCommunity.com.
I'm sure SourceForge has a similar macro file here I've just never had to use it.
http://www.asmcommunity.net/projects/nasmx/;==============================
%include '\nasm32\inc\win32\windows.inc'
;;;%include '\nasm32\inc\nasm32.inc'
extern MessageBoxA
;======== DATA
.data
title1 db 'A Windows Program', 0
string1 db 'Look, Ma! A Windows program!', 0
;==========CODE
.code
start:
;========== YOUR WAY
push MB_OK
push title1
push string1
push 0
call MessageBoxA
;======= A DIFFERENT WAY
;INVOKE requires a macro file similar to NASM32.INC to work.
; invoke MessageBoxA,0,string1,title1,MB_OK
ret
;
;hth
;mcamember
;