BUG: Assembling .ASM File With CL.EXE Fails w/ MASM 6.0 (74745)



The information in this article applies to:

  • Microsoft Macro Assembler (MASM) 6.0
  • Microsoft Macro Assembler (MASM) 6.0a

This article was previously published under Q74745

SYMPTOMS

Using the CL driver that comes with Microsoft C versions 6.0, 6.0a, and 6.0ax to invoke MASM versions 6.0 and 6.0a to assemble a .ASM file specified on the CL compile line will result in an error similar to one of the following:
error A2901: cannot run ML.EXE

-or-

Unknown option: /. Use /help for list of options

-or-

Assembling: NUL.asm
NUL.asm(0): error A2088: END directive required at end of file

CAUSE

The C online help for CL states that files that are listed on the command line with a .ASM extension will automatically cause MASM to be invoked. When this happens, CL.EXE invokes MASM.EXE. With MASM 5.1 or 5.1a, this will run the assembler.

However, with MASM 6.0 and 6.0a, MASM.EXE is a compatibility driver for ML.EXE, which executes version 6.0 of the assembler. The command-line switches and filename are not being passed correctly from the CL.EXE to ML.EXE. This results in a variety of error messages as shown above.

STATUS

Microsoft has confirmed this to be a problem in MASM versions 6.0 and 6.0a. We are researching this problem and will post new information here as it becomes available.

Modification Type:MajorLast Reviewed:10/20/2003
Keywords:KB74745