News:

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

File creation and write from macro

Started by korte, April 21, 2007, 03:37:51 PM

Previous topic - Next topic

korte

Possible?

possiblie file creation and write from masm32 macro in complilation time?

u

Nope.

For this task, I use "echo", get the output text and write it manually into a file.
Please use a smaller graphic in your signature.

drizz

something like this?
%echo @FileCur built @Date @Time with Masm version @Version on @Environ(OS) using processor @Environ(PROCESSOR_IDENTIFIER)
or with data
szer db 9,9,"(c) drizz 2005",13,10,13,10,13,10
db "built: ",9,9,@CatStr(<!">,@SubStr(%@Date,4,2),<.>,@SubStr(%@Date,1,2),<.>,@SubStr(%@Date,7,2),<!">),9
db "with masm v",@CatStr(<!">,@SubStr(@CatStr(<%@Version>),1,1),<.>,@SubStr(@CatStr(<%@Version>),2,2),<!">),13,10
db "on:",9,9,@CatStr(<!">,@Environ(OS),<!">),13,10
db "processor:",9,@CatStr(<!">,@Environ(PROCESSOR_IDENTIFIER),<!">),0

The truth cannot be learned ... it can only be recognized.

zooba

The first one. You can then pipe it into a separate file. I use this method for my larger libraries to automatically generate a list of prototypes or a module definition file.

Make sure you use the '/nologo' flag, otherwise you'll get the ML header in there too. Also note that ML and LINK both send errors to standard output, rather than standard error, so they'll be hidden inside the files. IF ERRORLEVEL 0 should be true (ie the following command will be run) if no errors occurred.

Cheers,

Zooba :U