Hallo,

I'm a semi-experienced assembler programmer but i need some help on to use MASM to write a multi module win32 program.

Basically i have been working on a long term project now in assembler, but it's all in one .asm listing and now it's getting cumbersome, so i want to split it into separate,related .ASM parts but i can't figure out how to assemble and link all the modules.. can some one help ?

Thanks
Posted on 2001-08-31 06:55:11 by CodeBug
Here is what I do when creating large projects.

I have a Main.asm file that only contains:

include Main.Inc
include Module1.asm
include Module2.asm
.
.
.
include ModuleX.asm

I try to create each module a logical unit
with all data and constants used in the module
inside the module. This makes reusing module in other
projects easier.

This works well for me.
Posted on 2001-08-31 09:20:20 by KetilO
Thanks my friend :-):cool:
Posted on 2001-09-01 08:04:12 by CodeBug
I prefer using "real" multi-module. Assemble each file separately,
then link them all together. Coupled with makefiles, you only have
to assemble the modules that have been changed... which can save
you a lot of time. Sure, it requires more work with extern/proto, include
files, and so on... but for me, it's well worth it.
Posted on 2001-09-01 09:10:04 by f0dder
MASM has a scalable architecture that allows a number of ways of breaking your code up into managable size files.

The simplest is "include myfile.asm" which inserts the file directly into the main source code at thew location where it is included from. A fully seperate module that can be linked into the main source file or build the same seperate module into a library and use "includelib MyLibrary.lib".

The library approach gives you a lot of extra power and flexibility when the project size starts to get large and you can write your own reusable code that way with the maximum of convenience.

In MASM32, have a look at the format of the m32lib directory and it will show how easy a library is to build. There is a plugin in the editor that makes a skeleton library module so if you want to use thids method, its no big deal to do.

Regards,

hutch@pbq.com.au
Posted on 2001-09-01 19:14:26 by hutch--
Thanks people, i'm all sorted !
Posted on 2001-09-06 19:12:29 by CodeBug