I am trying to include symbol passed from command line as string in my app. For example, app is compiled with:
ml /DREVISION=135M ...
Now in my code I'd like to do something like
db MakeString(REVISION), 0
(of course I just made that MakeString up), and get same thing as I'd get with
db "135M", 0
How to do this in MASM?
well - the symbol is essentially an EQUate - rather than defined data (as with DB)
try this
.data?
LabelName db 4 dup(?)
.code
mov LabelName,REVISION
then, you can reference LabelName
you may want to make it 5 bytes and add a null terminator :P
that will work for numeric values
i am not sure how to go about it for a TEXTEQUate
This works:
ml.exe /DMyVersion=Hello
.code
tmp$ CATSTR <print ">, MyVersion, <", 13, 10>
tmp$
Worked like charm, thank you very much