Hi

I'm up to this part here.

Now save the example under the name msgbox.asm. Assuming that ml.exe is in your path, assemble msgbox.asm with:

ml /c /coff /Cp msgbox.asm
/c tells MASM to assemble only. Do not invoke link.exe. Most of the time, you would not want to call link.exe automatically since you may have to perform some other tasks prior to calling link.exe.
/coff tells MASM to create .obj file in COFF format. MASM uses a variation of COFF (Common Object File Format) which is used under Unix as its own object and executable file format.
/Cp tells MASM to preserve case of user identifiers. If you use hutch's MASM32 package, you may put "option casemap:none" at the head of your source code, just below .model directive to achieve the same effect.
After you successfully assemble msgbox.asm, you will get msgbox.obj. msgbox.obj is an object file. An object file is only one step away from an executable file. It contains the instructions/data in binary form. What is lacking is some fixups of addresses by the linker.


I've tried just dropping the asm file over the ML.exe but nothing seems to happen.

Am i supposed to write this text in somewhere?

ml /c /coff /Cp msgbox.asm

thanks
Steve
Posted on 2005-01-05 02:14:05 by stevenroyals
if you downaloaded hutch package and installed it then
it should have installed masm in this path
c:\masm32

in this folder find qeditor.exe
use qeditor to open your MSGBOX.ASM
then from project --> use buildall
you can see msgbox.exe in the folder you have your msgbox.asm


if you are not having qeditor
assuming ml.exe and link.exe are in this folder
c:\your folder\bin

and libraries and includes are in the folder
c:\your folder\lib
c:\your folder\include

and assuming you changed the paths in msgbox.asm

include \masm32\include\windows.inc

to

include \your folder\include\windows.inc



you can go to start-->run ---> type cmd (i assume your os is nt based wiz w2k,xp etc if not use command.com instead of cmd.exe)--> press ok
the small black box should popup that is called dos prompt

now type cd\
the prompt will turn to c:\>
type cd your folder\bin
the prompt should change to
c:\your folder\bin>

type
ml /c /coff /Cp c:\wherever you have\msgbox.asm

it should assemble it and produce a msgbox.obj in c:\your folder\

which you can link


C:\masm32\BIN>ml /c /coff c:\masm32\icztutes\tute02\bullshit.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.

Assembling: c:\masm32\icztutes\tute02\bullshit.asm

C:\masm32\BIN>ml /c /coff c:\masm32\icztutes\tute02\bullshit.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.

Assembling: c:\masm32\icztutes\tute02\bullshit.asm

C:\masm32\BIN>link /subsystem:windows bullshit.obj
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.


C:\masm32\BIN>
Posted on 2005-01-05 04:45:38 by bluffer
Excellent!!

It worked the first time. I didn't know how to use qeditor.

So what is all the stuff about in the tutorial when it says to assemble the program?

ml /c /coff /Cp msgbox.asm

This will make an object file, and then later in the tutorial-

link /SUBSYSTEM:WINDOWS /LIBPATH:c:\masm32\lib msgbox.obj

This will make your exe file.

thanks
Steve
Posted on 2005-01-05 05:00:51 by stevenroyals
the project buildall actually executes a bat file that is situated in
c:\masm32\buildall.bat

a bat file is an automated way to give commandlines to dos to execute one by one

go to the said folder and find the builall.bat right click and select edit
it should open in notepad
look at its content all the above commands will be there :)
Posted on 2005-01-05 05:15:06 by bluffer
Ok it makes sense now.

Thanks for your help.
Posted on 2005-01-05 05:22:55 by stevenroyals