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
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
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:
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:
Tell him to use hand-written assembly :)
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>
<edit> Stupid me I noticed I forgot to mention in my original post about /FA configure assembly listing.. What about this option?</edit>
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.
/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.
Thank you, Bart. :grin: