Asmc Command-Line Reference

April 18, 2026 ยท View on GitHub

Asmc Macro Assembler Reference

Asmc Command-Line Reference

Assembles and links one or more assembly-language source files. The command-line options are case sensitive.

Syntax

asmc[64] [options] filename [ [options] filename] ... [-link link_options]

filename

The name of the file(s) including wildcard.

options

Options may be preceded by both a forward slash (/) and a dash (-) in Windows but only a dash in the Linux version. The options are listed in the following table:

Parameters

OptionAction
-[0..10][p]Selects CPU. Not available in ASMC64.
-arch:optionSpecifies the architecture for code generation.
-assertGenerate assert code.
-autostackCalculate required stack space for arguments.
-binGenerate plain binary file.
-Bl filenameSelects an alternate linker in filename.
-cAssembles only. Does no linking.
-CsPush user registers before stack-frame is created in a proc.
-coffGenerate COFF format object file.
-CpPreserves case of all user identifiers.
-CuMaps all identifiers to upper case (default).
-CxPreserves case in public and extern symbols.
-D symbol[=value]Defines a text macro with the given name symbol. If value is missing, it's blank. Multiple tokens separated by spaces must be enclosed in quotation marks.
-dotnameAllows names of identifiers to begin with a period.
-e numberSet error limit number.
-elfGenerate 32-bit ELF format object file.
-elf64Generate 64-bit ELF format object file.
-endbrInsert ENDBR instruction at function entry.
-EPGenerates a preprocessed source listing (sent to STDOUT). See -Sf.
-eqDon't display error messages.
-Fe filenameNames the executable file.
-Fi filenameForce file to be included.
-Fl[filename]Generates an assembled code listing. See -Sf.
-Fo filenameNames an object file. Se Remarks.
-fp numberSet FPU: 0=8087, 2=80287, 3=80387. Not available in ASMC64.
-fpcDisallow floating-point instructions. Not available in ASMC64.
-FPiGenerates emulator fix-ups for floating-point arithmetic (mixed language only). Not available in ASMC64.
-FPi8780x87 instructions (default). Not available in ASMC64.
-fPICGenerate Position Independent Code for ELF.
-fpicGenerate Position Independent Code for ELF.
-fpltGenerate Position Independent Code for ELF.
-fno-picDisables the generation of Position Independent Code for ELF (default).
-fno-pltGenerate Position Independent Code for ELF.
-frameAuto generate unwind information.
-Fw filenameSet errors file name.
-GcSpecifies use of FORTRAN- or Pascal-style function calling and naming conventions.
-GdSpecifies use of C-style function calling and naming conventions.
-GeEmit a conditional _chkstk() inside the prologue.
-GrSpecifies use of FASTCALL-style function calling and naming conventions.
-GsSpecifies use of SYSCALL (System V)-style function calling and naming conventions.
-GvSpecifies use of VECTORCALL-style function calling and naming conventions.
-GwSpecifies use of WATCALL-style function calling and naming conventions.
-GzSpecifies use of STDCALL-style function calling and naming conventions. Defines _STDCALL_SUPPORTED.
-helpDisplays a summary of Asmc command-line syntax and options.
-homeparamsForces parameters passed in registers to be written to their locations on the stack upon function entry.
-I pathnameSets path for include file.
-iddAssemble source as binary data.
-iddtAssemble source as text file.
-infoDisplays module assembly information.
-linkThe link options. For more information, see Linker options.
-logoPrint logo string and exit.
-m<model>Set memory model. Not available in ASMC64.
-MDMulti-threaded DLL. Defines _MT, _DLL, and _MSVCRT.
-MDdMulti-threaded Debug DLL. Defines _MT, _DLL, _MSVCRT and _DEBUG.
-MTMulti-threaded. Defines _MT.
-MTdMulti-threaded Debug. This option causes the assembler to select LIBCMTD if .PRAGMA comment(lib, LIBCMT) is used. Defines _MT and _DEBUG.
-mscrtGenerate MSCRT init/exit segments for ELF.
-mzGenerate DOS MZ binary file. Not available in ASMC64.
-nc nameSet class name of code segment.
-nd nameSet name of data segment.
-nm nameSet name of module.
-nt nameSet name of text segment.
-nolibIgnore INCLUDELIB directive.
-nologoSuppress copyright message.
-omfGenerates object module file format (OMF) type of object module.
-peGenerate PE binary file, 32/64-bit.
-qOperate quietly.
-rRecurse subdirectories with use of wildcards.
-SaTurns on listing of all available information.
-safesehMarks the object as either containing no exception handlers or containing exception handlers that are all declared with SAFESEH.
-SfAdds first-pass listing to listing file.
-SgTurns on listing of assembly-generated code.
-SnTurns off symbol table when producing a listing.
-Sp alignmentSet segment alignment.
-stackalignAlign stack variables to 16-byte.
-SxTurns on false conditionals in listing.
-wSame as /W0.
-W<level>Sets the warning level, where level = 0, 1, 2, or 3.
-win64Generate 64-bit COFF object. Defines _WIN64.
-ws[codepage]Store quoted strings as Unicode. Defines _UNICODE.
-WXReturns an error code if warnings are generated.
-XIgnore INCLUDE environment path.
-Z7Add full symbolic debugging information.
-zcwNo decoration for C symbols.
-ZdGenerates line-number information in object file.
-ZfMake all symbols public.
-zf0JWasm compatible FASTCALL type: MS (Use -Gr).
-zf1JWasm compatible FASTCALL type: OW (Use -Gw).
-ZgGenerate code to match Masm.
-ZiAdd symbolic debugging information.
-zlcNo OMF records of data in code. Not available in ASMC64.
-zldNo OMF records of far call. Not available in ASMC64.
-zlfSuppress items in COFF: No file entry.
-zlpSuppress items in COFF: No static procs.
-zlsSuppress items in COFF: No section aux entry.
-ZmEnable MASM 5.10 compatibility. Not available in ASMC64.
-ZneDisable syntax extensions not supported and enable syntax supported by Masm.
-Zp alignmentPacks structures of the specified byte boundary.
-ZsPerform syntax check only.
-ztSet STDCALL decoration.
-Zv8Enable Masm v8+ PROC visibility.
-zzeNo export symbol decoration.
-zzsStore name of start address.

Remarks

Some command-line options to ASMC and ASMC64 are placement-sensitive. For example, because ASMC and ASMC64 can accept several wildcard options, any corresponding -Fo options must be specified before files. When wildcard is used the filename part of the -Fo option may be replaced by an asterisk (*) as the following command-line example illustrates:

asmc -c -r *.asm -ws -Fo w* _t*.asm

Environment Variables

INCLUDESpecifies search path for include files.
ASMCSpecifies default command-line options.
TEMPSpecifies path for temporary files.

See Also

Asmc Reference | Error Messages | Predefined macros