Author Topic: "Things You Would Place Outside of .code and .data Directives", Ready? Go  (Read 223 times)

TheGodOfKratos

  • Regular Member
  • *
  • Posts: 13
  • Because I Can
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.
Visual Studio 2017 - Microsoft's MASM

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4513
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
 :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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

TheGodOfKratos

  • Regular Member
  • *
  • Posts: 13
  • Because I Can
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.

Visual Studio 2017 - Microsoft's MASM

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4513
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

LordAdef

  • Member
  • ***
  • Posts: 257
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