I am attempting to use ML.exe /Dfoo=value option, but I am not sure as to how foo symbol is to be read from inside .asm source? echo <foo> or anything like that did not produce pleasible results.
Posted on 2002-11-25 07:19:21 by comrade
%echo FOO


Mirno
Posted on 2002-11-25 08:06:50 by Mirno
Save this snippet as d.bat

;@echo off

;goto make

.386
.model flat, stdcall
option casemap:none

.code
start:
IFDEF foo
% echo foo
IF foo EQ 1
echo Do something
ELSEIF foo EQ 2
echo Do something other
ENDIF
ENDIF
end start

:make
\masm32\bin\ml /nologo /c /coff /Dfoo=1 d.bat
\masm32\bin\link /nologo /subsystem:windows d.obj

del d.obj

pause
Posted on 2002-11-25 08:15:03 by Four-F
Eschyo raz spasibo, Four-F.
Thank you as well, Mirno.
Posted on 2002-11-25 18:56:12 by comrade