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
| Option | Action |
| -[0..10][p] | Selects CPU. Not available in ASMC64. |
| -arch:option | Specifies the architecture for code generation. |
| -assert | Generate assert code. |
| -autostack | Calculate required stack space for arguments. |
| -bin | Generate plain binary file. |
| -Bl filename | Selects an alternate linker in filename. |
| -c | Assembles only. Does no linking. |
| -Cs | Push user registers before stack-frame is created in a proc. |
| -coff | Generate COFF format object file. |
| -Cp | Preserves case of all user identifiers. |
| -Cu | Maps all identifiers to upper case (default). |
| -Cx | Preserves 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. |
| -dotname | Allows names of identifiers to begin with a period. |
| -e number | Set error limit number. |
| -elf | Generate 32-bit ELF format object file. |
| -elf64 | Generate 64-bit ELF format object file. |
| -endbr | Insert ENDBR instruction at function entry. |
| -EP | Generates a preprocessed source listing (sent to STDOUT). See -Sf. |
| -eq | Don't display error messages. |
| -Fe filename | Names the executable file. |
| -Fi filename | Force file to be included. |
| -Fl[filename] | Generates an assembled code listing. See -Sf. |
| -Fo filename | Names an object file. Se Remarks. |
| -fp number | Set FPU: 0=8087, 2=80287, 3=80387. Not available in ASMC64. |
| -fpc | Disallow floating-point instructions. Not available in ASMC64. |
| -FPi | Generates emulator fix-ups for floating-point arithmetic (mixed language only). Not available in ASMC64. |
| -FPi87 | 80x87 instructions (default). Not available in ASMC64. |
| -fPIC | Generate Position Independent Code for ELF. |
| -fpic | Generate Position Independent Code for ELF. |
| -fplt | Generate Position Independent Code for ELF. |
| -fno-pic | Disables the generation of Position Independent Code for ELF (default). |
| -fno-plt | Generate Position Independent Code for ELF. |
| -frame | Auto generate unwind information. |
| -Fw filename | Set errors file name. |
| -Gc | Specifies use of FORTRAN- or Pascal-style function calling and naming conventions. |
| -Gd | Specifies use of C-style function calling and naming conventions. |
| -Ge | Emit a conditional _chkstk() inside the prologue. |
| -Gr | Specifies use of FASTCALL-style function calling and naming conventions. |
| -Gs | Specifies use of SYSCALL (System V)-style function calling and naming conventions. |
| -Gv | Specifies use of VECTORCALL-style function calling and naming conventions. |
| -Gw | Specifies use of WATCALL-style function calling and naming conventions. |
| -Gz | Specifies use of STDCALL-style function calling and naming conventions. Defines _STDCALL_SUPPORTED. |
| -help | Displays a summary of Asmc command-line syntax and options. |
| -homeparams | Forces parameters passed in registers to be written to their locations on the stack upon function entry. |
| -I pathname | Sets path for include file. |
| -idd | Assemble source as binary data. |
| -iddt | Assemble source as text file. |
| -info | Displays module assembly information. |
| -link | The link options. For more information, see Linker options. |
| -logo | Print logo string and exit. |
| -m<model> | Set memory model. Not available in ASMC64. |
| -MD | Multi-threaded DLL. Defines _MT, _DLL, and _MSVCRT. |
| -MDd | Multi-threaded Debug DLL. Defines _MT, _DLL, _MSVCRT and _DEBUG. |
| -MT | Multi-threaded. Defines _MT. |
| -MTd | Multi-threaded Debug. This option causes the assembler to select LIBCMTD if .PRAGMA comment(lib, LIBCMT) is used. Defines _MT and _DEBUG. |
| -mscrt | Generate MSCRT init/exit segments for ELF. |
| -mz | Generate DOS MZ binary file. Not available in ASMC64. |
| -nc name | Set class name of code segment. |
| -nd name | Set name of data segment. |
| -nm name | Set name of module. |
| -nt name | Set name of text segment. |
| -nolib | Ignore INCLUDELIB directive. |
| -nologo | Suppress copyright message. |
| -omf | Generates object module file format (OMF) type of object module. |
| -pe | Generate PE binary file, 32/64-bit. |
| -q | Operate quietly. |
| -r | Recurse subdirectories with use of wildcards. |
| -Sa | Turns on listing of all available information. |
| -safeseh | Marks the object as either containing no exception handlers or containing exception handlers that are all declared with SAFESEH. |
| -Sf | Adds first-pass listing to listing file. |
| -Sg | Turns on listing of assembly-generated code. |
| -Sn | Turns off symbol table when producing a listing. |
| -Sp alignment | Set segment alignment. |
| -stackalign | Align stack variables to 16-byte. |
| -Sx | Turns on false conditionals in listing. |
| -w | Same as /W0. |
| -W<level> | Sets the warning level, where level = 0, 1, 2, or 3. |
| -win64 | Generate 64-bit COFF object. Defines _WIN64. |
| -ws[codepage] | Store quoted strings as Unicode. Defines _UNICODE. |
| -WX | Returns an error code if warnings are generated. |
| -X | Ignore INCLUDE environment path. |
| -Z7 | Add full symbolic debugging information. |
| -zcw | No decoration for C symbols. |
| -Zd | Generates line-number information in object file. |
| -Zf | Make all symbols public. |
| -zf0 | JWasm compatible FASTCALL type: MS (Use -Gr). |
| -zf1 | JWasm compatible FASTCALL type: OW (Use -Gw). |
| -Zg | Generate code to match Masm. |
| -Zi | Add symbolic debugging information. |
| -zlc | No OMF records of data in code. Not available in ASMC64. |
| -zld | No OMF records of far call. Not available in ASMC64. |
| -zlf | Suppress items in COFF: No file entry. |
| -zlp | Suppress items in COFF: No static procs. |
| -zls | Suppress items in COFF: No section aux entry. |
| -Zm | Enable MASM 5.10 compatibility. Not available in ASMC64. |
| -Zne | Disable syntax extensions not supported and enable syntax supported by Masm. |
| -Zp alignment | Packs structures of the specified byte boundary. |
| -Zs | Perform syntax check only. |
| -zt | Set STDCALL decoration. |
| -Zv8 | Enable Masm v8+ PROC visibility. |
| -zze | No export symbol decoration. |
| -zzs | Store 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
| INCLUDE | Specifies search path for include files. |
| ASMC | Specifies default command-line options. |
| TEMP | Specifies path for temporary files. |