Using Visual C++ Express...

Started by Tron2.0, January 13, 2010, 03:59:26 PM

Previous topic - Next topic

TNick

With the new ml from Visual Studio Express
QuoteMicrosoft (R) Macro Assembler Version 9.00.30729.01
I use a batch file like this:
Quote
@ECHO OFF
TYPE nul > Junk.txt

call "Clean.bat"

@ECHO OFF
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" >> Junk.txt
ECHO. >> Junk.txt
ECHO . . . . . . . . . . . . . . . . . . . . . . . . >> Junk.txt
ECHO. >> Junk.txt

"C:\masm32\bin\RC.EXE" /v "AxyGenV2.rc" >> ../Junk.txt
ECHO. >> Junk.txt
ECHO . . . . . . . . . . . . . . . . . . . . . . . . >> Junk.txt
ECHO. >> Junk.txt
IF NOT %ERRORLEVEL% == 0 GOTO TST_Asm_E
"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\ML.EXE" /c /coff /Cp /Zi /Zd /nologo /I"C:\MASM32\INCLUDE" AppName.Asm >> Junk.txt
ECHO. >> Junk.txt
ECHO . . . . . . . . . . . . . . . . . . . . . . . . >> Junk.txt
ECHO. >> Junk.txt
IF NOT %ERRORLEVEL% == 0 GOTO TST_Asm_E
"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\LINK.EXE" /SUBSYSTEM:WINDOWS /DEBUG /LIBPATH:"C:\MASM32\LIB" /OUT:"AppName2.exe" AppName.obj >> Junk.txt
IF NOT %ERRORLEVEL% == 0 GOTO TST_Asm_E
ECHO. >> Junk.txt
ECHO . . . . . . . . . . . . . . . . . . . . . . . . >> Junk.txt
ECHO. >> Junk.txt


del /q Junk.txt
ECHO ////////////////////////////////////////////////
ECHO ------------------------------------------------
ECHO _       B U I L D     S U C C E S S F U L      _
ECHO ------------------------------------------------
ECHO \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

GOTO EXITM


:TST_Asm_E
POPD
ECHO =================================================
ECHO /
ECHO APP COULD NOT BE ASSEMBLED
ECHO ERRORLEVEL IS %ERRORLEVEL%
ECHO \
ECHO =================================================
TYPE Junk.txt
ECHO =================================================

PAUSE


:EXITM
@ECHO ON


See if calling that bat file will do any good.
You may replace the paths with fully qualified paths to see if what dave is saying is the root of the problem (but I guess you already know that).

Nick

Tron2.0

Ok, this is weird....
I don't understand why, but debugging with VC2008 and the "step into" function, sometimes there is no corrispondence between source and code....Actually is pointing to a blank source... :eek
There is a keyword that wraps the internal counter of the assembler and messing around the code?
Any ideas?

I know that "proc" and "ret" causes the assembler to put the prologue and epilogue code before (and not after) the line that contain them.

TNick

I don't actually use VC for debugging, but WinDBG. I think they use same core, however.
The thing that you say happens whenever I edit the sources, save the file, but I don't assemble. Debug informations are not updated, so I have weird results.

Otherwise, I have no idea about what could cause your problem... sorry

Nick

Tron2.0

Ok, i have found the reason....
Maybe ML9 has a bug with .DATA and .CODE keywords.
The problem was created by a file with a .DATA section. The counter wraps and eschange code count with data count, i think.
So, i put a .CODE as last command in that file and all works.

GregL

#19
Neither ML 9.0 nor the VC debugger should have a problem with a .DATA directive. The .DATA directive is such a common thing in MASM code, I can't imagine there would be any bugs caused by it.  Post your code or an example showing the problem.