Hi, I was wondering how MASM32 converts the HLL-like syntax (ie. .IF .ELSEIF ...) into raw assemby, so I want to see the raw assembly file that will be used by the compiler, how do I get this? I've tried using /Fl directive, but it gives an error associated with windows.inc. Thanx.
Posted on 2001-01-27 10:39:00 by Dee-Jon Bryce
Excellent idea. Listing files can pinpoint lots of those strange bugs you (OR the copiler) write. Personally, I use the macros in \masm32\bin\ to build with. I change the compile line as such: \masm32\bin\ml /c /Fl /coff %1.asm Then, you need a .LISTALL compiler switch in your .asm file. Do yourself a BIG favor and first put .NOLIST before your include files, and then the .LISTALL after it. No sense having the include file stuff inside your listing Some stats: A 17K executable w/o .NOLIST before the includes: 3.0 megs A 17K executable WITH .NOLIST before the includes: 1.6 megs
Posted on 2001-01-27 11:25:00 by Ernie
The /Sg switch turns on generated code for INVOKE .IF etc. Edited to add- I also get the error with the .INC file. Put the .NOLIST before, and the .LISTALL after the .INC, as Ernie suggested, and the error goes away (for some reason...). This message was edited by S/390, on 1/29/2001 3:05:54 AM
Posted on 2001-01-29 02:59:00 by S/390
There is another option, Clive Turvey's DUMPPE is included in MASM32 and it outputs reasonably tidy assembler from the assembled EXE, the only problem is finding the code you are after so I use a trick, put 10 or so NOP instructions just before the code you are after and run DumpPe and then search for the NOPs. Regards, hutch@pbq.com.au
Posted on 2001-01-29 05:52:00 by hutch--
S/390, I suggest putting the .NOLIST before the include files merely to remove them from the listing. Double reason: Windows.inc is HUGE, and it comes BEFORE my code. Ouch. However, forgetting this just produces a larger file for me. IE, it works. I wonder if you have buggy inc files (but no idea which or why) Ernie
Posted on 2001-01-29 07:33:00 by Ernie
Good morning Ernie. Sorry if I sounded confusing. I just wanted to point that .nolist also seems to fix the error that Dee-Jon gets. I'm not sure why it does, but it works for me. I think the problem started when I started using version 1.23 of windows.inc. I can go back and try it with the older version to confirm this, if you think it would help.
Posted on 2001-01-29 08:11:00 by S/390
Well, version 1.18 of windows.inc does the same thing, but a different error: C crBkgnd COLORREF <> C:\MASM32\INCLUDE\windows.inc(22712) : error A2167: unexpected literal found But, if I wrap a .NOLIST / .LISTALL around my .INC, both versions of windows.inc assemble without error! Beats me... PS - Tried both MASM 6.14 and MASM 6.15 This message was edited by S/390, on 1/29/2001 9:05:39 AM
Posted on 2001-01-29 08:58:00 by S/390
Good news! Version 1.19 of WINDOWS.INC assembles without error, either with or without .NOLIST ! Thanks to Ernie, I found a link to it on the COM board. :) http://www.hiroshimator.com/asmcommunity/download/wininc.zip
Posted on 2001-01-30 02:24:00 by S/390
S/390, Well sure it does, that's the version off my computer, and if an .inc file misbehaves, I beat it. ;-) IE, that same version from Icz might have similar bugs (I don't always remember to make reports to Icz)
Posted on 2001-01-30 18:52:00 by Ernie