News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

echo out

Started by chili, February 01, 2006, 07:17:05 PM

Previous topic - Next topic

chili

I wanna prompt a variable that is calculated during assembly to a separate file. How can i change stdout within my ".asm" file?
(I tried it like in ".bat-files", but it won't work.)

frank

P1

Please explain what your doing.  Or maybe post some code.  Because it sounds like to me, your asking a DOS commandline style question.  I don't know if I should move this post there or you still have a desire for a Win32 solution.

Regards,  P1  :8)

MichaelW

The ECHO and %OUT directives send their output to the standard output device, so the output can be redirected on the command line, using something like this:

\masm32\bin\ml /c /coff "test.asm" > asmout.txt

For the ECHO and %OUT directives the argument must be a single text value, so to handle a numeric value you must first convert it to text. You can do the conversion with the MASM32 num2str macro and output the converted value with:

% echo num2str(arg)

Or:

% %out num2str(arg)

eschew obfuscation