Hi all,
This is for a friend of mine.. he asked me if VisualC++, when one makes it produce an .asm output, can be set up in a way to reduce as much as possible the source bloat it produces. Sorry, I don't have more details.. but he talked about a possible way to configure the compiler when outputting .asm code. Does anybody know?

Thanks,
Maverick
Posted on 2002-07-16 03:28:42 by Maverick
use with /FA

Alt-F7 (Projects->Settings) Under C/C++ tab and add /FA on project options.

.ASM file is on the debug/release folder.

::edit::

as for reducing bloat, you can use

/o1 - this will optimize for size

or use the command line directly...

cl /c /MD /Gz /GB /o1 /FA filename.c

and link with the linker provided in the MASM32: \masm32\bin\link /SUBSYSTEM:CONSOLE filename.obj

There are a lot of combo's you can make, it's just way to many of them.

::edit again::

Forgot to add /FA on the compiler arguments. I don't know any other options aside from the one above. Use hand coded asm as was stated by bAZiK below. :grin:
Posted on 2002-07-16 03:33:49 by stryker
Tell him to use hand-written assembly :)
Posted on 2002-07-16 04:05:08 by bazik
stryker: thanks for the hints.. thanks also to bAZiK but I'm afraid coding in asm would be too easy.. ;)

<edit> Stupid me I noticed I forgot to mention in my original post about /FA configure assembly listing.. What about this option?</edit>
Posted on 2002-07-16 09:05:48 by Maverick
There are only a few options for FA. This is from the documentation.

/FA - Assembly-Only Listing - Assembly code; .ASM

/FAc - Assembly With Machine Code - Machine and assembly code; .COD

/FAs - Assembly With Source Code - Source and assembly code; .ASM

/FAcs - Assembly, Machine Code, and Source - Machine, source, and assembly code; .COD

/Fafilename - Listing File Name - Use /Fa to specify a directory and/or filename for the selected type of listing file. By default, the base name of the listing file is the base name of the source file.
Posted on 2002-07-16 10:32:57 by stryker
Thank you, Bart. :grin:
Posted on 2002-07-16 14:21:27 by Maverick