Re: Printing from MASM (and other droll questions)
- From: hutch-- <hutch@xxxxxxxxx>
- Date: Thu, 27 Dec 2007 18:35:16 -0800 (PST)
Here is a version that works from the masm32 project that your
includes assume. MessageBox is in USER32.DLL so I added the include
and lib, I added the entry point so masm knows where to start the
application and it is matched by the "end entry_point" directive so
masm knows where the file end is.
You don't need to terminate a string with ascii 13 or 10 unless you
need the next line with text on it. 10 works but DOS/Windows standard
is still 13,10 so its more reliable in more places.
.486
.model flat, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
..data
helloString db "Hello World ",33, 0
..code
entry_point:
fn1 proc
invoke MessageBox, NULL, addr helloString, addr
helloString,MB_OK
;; invoke StdOut, addr helloString
ret
fn1 endp
end entry_point
-------------------------
You can get help on masm at the masm forum at www.masm32.com
Regards,
hutch at movsd dot com.
.
- References:
- Prev by Date: Re: asm grep
- Next by Date: Re: Printing from MASM (and other droll questions)
- Previous by thread: Re: Printing from MASM (and other droll questions)
- Next by thread: Re: Printing from MASM (and other droll questions)
- Index(es):
Relevant Pages
|