The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: korte on January 05, 2008, 10:35:08 PM

Title: add include file ml in batch
Post by: korte on January 05, 2008, 10:35:08 PM


how to add ml parameter include file.

not write  include file.inc in assembly source, only batch file

Title: Re: add include file ml in batch
Post by: MichaelW on January 06, 2008, 12:31:15 AM
I'm not sure if this answers your question, but it seems to work OK.

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    incrt
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    .data
    .code
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
start:
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    inkey "Press any key to exit..."
    exit
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end start


@echo off

if exist "test.obj" del "test.obj"
if exist "test.exe" del "test.exe"

\masm32\bin\ml /D incrt="include \masm32\include\masm32rt.inc" /c /coff "test.asm"
if errorlevel 1 goto errasm

\masm32\bin\Link /SUBSYSTEM:CONSOLE "test.obj"
if errorlevel 1 goto errlink
dir "test.*"
goto TheEnd

:errlink
echo _
echo Link error
goto TheEnd

:errasm
echo _
echo Assembly Error
goto TheEnd

:TheEnd

pause

Title: Re: add include file ml in batch
Post by: korte on January 06, 2008, 09:14:24 AM
yes
thx