How can I find out what exactly is the compiler doing when I'm using the simplified segment control directives (.data, .code, etc) ?If I wanted to substitute them with complete control directives, what would give me exactly the same executable ?

So far, I have substituted the following two lines
<B>.MODEL flat, stdcall
OPTION casemap:none</B>

with these ones:
</B>OPTION CASEMAP:NONE, LANGUAGE:STDCALL, SEGMENT:FLAT
ASSUME cs:FLAT, ds:FLAT, es:FLAT, ss:FLAT, fs:ERROR, gs:ERROR</B>

and I declare my segments like this:
<B>_DATA SEGMENT DWORD PUBLIC 'DATA'
_TEXT SEGMENT DWORD PUBLIC 'CODE'</B>

The linker still generates segments named .text, .data, .reloc, etc. , but my final executable is bigger. Any one knows how can I substitute the <B>.data?</B> simplified directive with a complete one ? Also, how can I change the default name ".text " for the code segment ? I recall reading somewhere that it is possible to override this default.

Thanks for your help
Posted on 2001-10-12 15:30:49 by Unregistered
Have you tried reading the MASM manual - it's your best resource to solve this problem (IMHO).
Posted on 2001-10-17 23:51:48 by bitRAKE
to prevent MASM from generating the standard segments you have to avoid the .model directive (and option LANGUAGE of course). But without that, you cannot use MASM32 include files (at least not without some modifications)
Posted on 2001-10-18 03:47:31 by japheth