hi, I'm trying to assmeble msgbox.asm from somwhere else on my hard drive, other than C:\masm32\blah...

Instead I put msgbox.asm here:

C:\Program Files\asmproj

it says it can't compile program.asm which means it is having an error with spaces in the pathname how do I fix this?

I also used the program from an earlier version of iczelion's tutorials, but it is on his website.

.386
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib

.data
MsgBoxCaption  db "Iczelion Tutorial No.2",0
MsgBoxText       db "Win32 Assembly is Great!",0

.code
start:
invoke MessageBox, NULL, addr MsgBoxText, addr MsgBoxCaption, MB_OK
invoke ExitProcess, NULL
end start

Found here: http://win32assembly.online.fr/tut2.html

will the .386 mess things up? what does the /coff do really?
and how do you know whether to console assemble or not?

Well I hope someone answers,

Thanks for reading.
Posted on 2008-07-01 18:45:36 by kaiplak
Hey, welcome aboard :)

I've removed your double-post in the other subforum, the one here in MAIN is the more appropriate section. My reply is going to be a bit brief since I'm heading to bed, but if you need more help perhaps somebody else can chime in.

The MASM32 package is particularly quirky about source code paths - with the default setup, you cannot have your source on a different partition than the MASM32 install, and I'm not the least surprised if it doesn't handle spaces in paths gracefully, either.

Your choices are either moving to an assembly IDE (there's a few around), or a better text editor than qedit, and learn how to invoke ml.exe and link.exe manually from a command-line (or set up tool definitions in your editor of choice).

.386 simply means you want to use instructions that appeared with the 80386 CPU.

/coff is superfluous with the most recent MASM versions, since that's the default output format now; in early days intel-OMF was the default output, but modern tools use COFF.

Whether to "console assemble" or not depends on whether you want to code commandline apps or full GUI apps, basically...
Posted on 2008-07-01 18:59:45 by f0dder
I've been using MASM32 and its QEditor for a long time without any problem. Within the MASM folder, I create a subfolder named Projects. Within that, I open a subfolder for each individual project. The nice thing about the QEditor is that you can assemble and link your source code  either for console applications or GUI applications from the menu. You can also assemble your resource file from the menu, either separately or along with your source code.

(I've always hated making MAKE.BAT files for each and every application unless absolutely necessary since I usually write some 100 short apps every year.) :shock: :shock:
Posted on 2008-07-01 22:15:19 by Raymond
so how do you console assemble manually? what flag do you use after ml to do so?


(I've always hated making MAKE.BAT files for each and every application unless absolutely necessary since I usually write some 100 short apps every year.) :shock: :shock:


What do you mean?

I guess you guys are starting to wonder doubt my computer experience. I can program in Java, and used to be able to program poorly in C. I want to program in asm at an advanced level so I can more fully understand the computer since asm utilizes features directly related to the hardware of the computer.

Continue responding,

And thanks so far for the responses, sorry about the double post I just wanted someone to notice.
Posted on 2008-07-01 23:32:45 by kaiplak
I use and recommend RadAsm IDE - this editor is like QEdit on steroids, it does everything that Qed does, and a whole lot more - edit multiple source files at once, mouseover api and structs to see information about them, and can drive pretty much any compiler or assembler... I use it to drive MASM, that's why I mention it.
Posted on 2008-07-02 03:08:41 by Homer
I got the Radasm Ide and it doesn't work it won't make the project when I say make new project it brings up the project wizrd and I type in the name of the project and then I press next next and finish as the radasm ide beginning tutorial says. simply doesn't work. so what are some other ides that work better. Or can anyone tell me why this is happening? I will tell you that the template thing below proj folder isn't there.
Posted on 2008-07-03 05:35:47 by kaiplak
OK never mind about the last post I figured out why it wouldn't create any project folders I'd tell it to.

so how do you console assemble manually? what flag do you use after ml to do so?


(I've always hated making MAKE.BAT files for each and every application unless absolutely necessary since I usually write some 100 short apps every year.) :shock: :shock:


What do you mean?


Could someone respond to these questions I'm curious about them thanks.
Posted on 2008-07-03 16:44:44 by kaiplak
(I've always hated making MAKE.BAT files for each and every application unless absolutely necessary since I usually write some 100 short apps every year.) 

What do you mean?


What I meant by this is that after I write my source code (saved as an .asm file), and a resource file if necessary (saved as an rsrc.rc file), all I have to do is open up the menu's Project tab of QEditor and simply click on either the "Assemble & Link" option, or the "Build All" option if I have not yet compiled the resource file. I don't know about Radasm or others but they may have similar options.
Posted on 2008-07-03 23:00:30 by Raymond
but when do you have to write make.bat files?
Posted on 2008-07-04 04:56:12 by kaiplak
To make RadASM work, you'll need to edit one line of the RadASM.INI file.



Assembler=masm


And you'll need to have Radasm's MASM pack installed too.
Posted on 2008-07-04 20:51:19 by Homer

but when do you have to write make.bat files?

The only time I can remember having to write a make.bat file was when I wrote my FPULIB, Mixlib and ZLIB to assemble each of the functions individually and assemble them as .lib files.
Posted on 2008-07-04 21:08:17 by Raymond
RadASM will let you edit the buildtime options that are sent to the assembler and linker.
You can edit them per project, if a particular project needs special options, you can choose them. And you can make a template for your next project.
It is worth the effort to check it out, the only complaint I've ever heard is that it does colored syntax hilighting, I actually find it useful and cool, for example opcodes are one color, registers are another color, and known api function names are another color.

Posted on 2008-07-05 04:07:11 by Homer