"Things You Would Place Outside of .code and .data Directives", Ready? Go

Started by TheGodOfKratos, April 21, 2017, 12:28:16 AM

Previous topic - Next topic

TheGodOfKratos

I question whether this is really a Kip Irvine book question. But since I'm learning MASM from his book it is certainly the impetus for most of my questions. He doesn't make it 100% clear where things like prototypes, constants, equates, etc, should officially be placed. My general belief for where these things are 'acceptable' to place is mostly at the beginning of source files outside of .code and .data segments.

But I also have a gripe about Microsoft's MASM and the way it reports errors. Sometimes, it will tell you when you need a .model directive and what not. But if you place any constants, equates, prototypes or PUBLIC (and related EXTERN) directives prior to the .model directives you get linker errors about unresolved symbols.

So, it seems that in the world of Microsoft assembly language, that a few directives must precede all others when building a multi-module project. This was not made 100% clear in the book to my recollection.

Sub-question: Is Microsoft's Macro Assembler the impetus for this websites existence? Or is MASM being used more generally? I don't see Microsoft's name much anywhere on the website.

hutch--

 :biggrin:

> I don't see Microsoft's name much anywhere on the website.

Use of the Microsoft trade name is a copyright violation. Its common knowledge that ML.EXE (historically known as MASM) is a long term Microsoft tool that started development in about 1982, the 32 bit versions in use today derive from the 1990 MASM 6.0 retail version and has been upgrade on a needs basis for years. 64 bit MASM is an entirely different tool and while it is similar in some respects, there are major differences.

The forum is primarily to support the MASM32 SDK but it caters for many other folks, the problem with Kip Irvine's book is that he does not support it on the internet otherwise his customers would not be asking basic questions on how it is used. Some of our members try and help folks using the Irvine system but it is crippled by design and libraries that are designed for one purpose, getting students through a semester.

The MASM32 SDK is for production code for applications and it has been used for that purpose for about 20 years.

TheGodOfKratos

Thanks for your post. I actually came across the main page of this website this morning by typing in just masm32.com. I guess I had only seen the forums area prior to this morning by way of a Google search I imagine. It did mention Microsoft there.

Clicking on "Home" gets you to the home of the forum I guess, not the actual website.


hutch--

Its going to depend on what you want to do with MASM. Kip Irvine's book is for students but its code is not production quality for 32 bit Windows. If you start with the technically correct basics of register usage, procedure calls and the like, you will develop a skill that will produce fast and reliable 32 bit Windows code. For a variety of targets, MASM will produce very good executable files when written properly, truly wicked DLL files and of course it will produce object modules that Microsoft C/C++ can link into C style excutables.

I would recommend that you shift to the MASM32 SDK if you want to write serious Windows code as among other things, there are many people who understand this style of code and the support is far better.

LordAdef

Hutch, allow me to add that included in MASM32 SDK is a invaluable set of examples in the help folder. Complemented by Iczelion's tutorials you will have enough material to evolve. You should keep Irvine's book only for quick checks. MASM32 is the big thing.

ps: If you are into books, I bought this one and it is a nice one: Modern X86 Assembly Language Programming
by Daniel Kusswurm

hanania

Hi all
i use windows7 64 and installed Visual Studio 2013 and masm is included but since then i have lots of problems> i wanted to know anything about assembly coding..the result..i am busy searching all the web for masm problem inside Visual Studio :) anyhow..ml.exe does lots of errors in output file after debuging ... i dont know if i can install masm outside Visual Studio and link it to the program or not...
life is hard ,but i still servive :)

jj2007

Quote from: hanania on September 01, 2018, 08:38:10 PMi wanted to know anything about assembly coding..

Congrats, you are at the right place here! Install the SDK, then come back and show us your code and problems. And forget about Visual Studio, it's not the right tool; the SDK has a simple editor at \Masm32\QEditor.exe that will help you to do the first steps.