CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Posts
    46

    How do I compile MASM 9 with VStudio 2008?

    I wrote an assembly program in Notepad and changed the extension to .asm. I found the MASM file, ML.exe in MS Visual Studio 9.0\VC\bin. In command prompt, I ran "ML first.asm", but got an error "MASM : fatal error A1000:cannot open file : first.asm" even though I had the file in the correct location. Any help? Thanks.

  2. #2
    Join Date
    Jul 2007
    Location
    somwhere nearby
    Posts
    150

    Re: How do I compile MASM 9 with VStudio 2008?

    Quote Originally Posted by sysop1911 View Post
    I wrote an assembly program in Notepad and changed the extension to .asm. I found the MASM file, ML.exe in MS Visual Studio 9.0\VC\bin. In command prompt, I ran "ML first.asm", but got an error "MASM : fatal error A1000:cannot open file : first.asm" even though I had the file in the correct location. Any help? Thanks.
    (for masm 6.14 as far as i know you need three files for a successful compilation , Masm.exe Link.exe, and Ml.exe, i dont think the masm 9 differs in this way
    .and for that 'can't open file' error , try copying your source code in another file and save it again , and delete this file , i've faced this kind of error alot during coding in asm , and doing this solved the issue in 99% of the time
    Last edited by Master.; August 1st, 2010 at 12:54 PM.

  3. #3
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: How do I compile MASM 9 with VStudio 2008?

    Hmmm... I have a MASM 6.14 here, and it has ml.exe and link.exe, but no masm.exe. It has always compiled my files perfectly without that.

    I have been editing my ASM source files with Notepad++, but I can't imagine how this could make any difference.

  4. #4
    Join Date
    Jul 2007
    Location
    somwhere nearby
    Posts
    150

    Re: How do I compile MASM 9 with VStudio 2008?

    Quote Originally Posted by Eri523 View Post
    Hmmm... I have a MASM 6.14 here, and it has ml.exe and link.exe, but no masm.exe. It has always compiled my files perfectly without that.

    I have been editing my ASM source files with Notepad++, but I can't imagine how this could make any difference.
    really? i've been recently using this compiler , ( you know that i've always used masm 5.10 ) and for compiling my sourcecode , i actually do :
    Code:
    masm my.asm, , , ,
    link my.obj, , , , ,
    and this compiles just fine !
    and same here, i do also use notepad++ for editing my asm codes, but believe me this happened to me , and the only way i could get it to compile was to copy the whole source codes and paste them to a newly created file( .asm) and it worked then.
    and yet i couldn't have figured out what the cause could be .
    whats that Ml.exe anyway?
    Last edited by Master.; August 1st, 2010 at 11:56 PM.

  5. #5
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: How do I compile MASM 9 with VStudio 2008?

    Just last week I built a DLL with MASM 6.14 and this batch file:

    Code:
     
    @echo off
     
    if exist bcdll.obj del bcdll.obj
    if exist bcdll.dll del bcdll.dll
     
    rem Add /Fl on the following line to get output listing
    \masm32\bin\ml /c /coff bcdll.asm
     
    \masm32\bin\Link /SUBSYSTEM:WINDOWS /DLL /DEF:bcdll.def bcdll.obj
     
    dir bcdll.*
     
    pause
    It is a modified version of a batch file that was contained in one of the examples that came with the package and works just fine.

    Quote Originally Posted by Master. View Post
    whats that Ml.exe anyway?
    Early DOS versions of Microsoft C had a cl.exe that in turn called c1.exe, c2.exe and c3.exe, which contained the preprocessor, the core compiler and the optimizer. So I think cl.exe could be considered some kind of wrapper for the individual components. Current VC++ compilers appear to be constructed in a similar way, although the components are DLLs now.

    I think they simply adopted that pattern for their newer assembler versions, where ml.exe itself contains the entire assembler. IMO your masm.exe could be a wrapper that converts the original masm syntax and then calls ml.exe.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured