Re: Printing from MASM (and other droll questions)
- From: gtb <goodTweetieBird@xxxxxxxxxxx>
- Date: Fri, 28 Dec 2007 08:58:35 -0800 (PST)
On Dec 27, 9:35 pm, hutch-- <hu...@xxxxxxxxx> wrote:
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 atwww.masm32.com
Regards,
hutch at movsd dot com.
Thank you sir. I shall now do some reading at the forum b4 posting
again.
gtb
.
- References:
- Printing from MASM (and other droll questions)
- From: gtb
- Re: Printing from MASM (and other droll questions)
- From: hutch--
- Printing from MASM (and other droll questions)
- Prev by Date: Re: Printing from MASM (and other droll questions)
- Next by Date: Re: asm grep
- Previous by thread: Re: Printing from MASM (and other droll questions)
- Next by thread: [OT] new video connection
- Index(es):
Relevant Pages
|