ASMC(1)

πŸ’– ASMC(1) β€” User Commands πŸ’–

okay bestie, sit down, hydrate, because we're about to talk about asmc, aka the Asmc Macro Assembler. she's an assembler. she's iconic. she's gonna turn your little .asm files into actual machine code and she does NOT need an attitude about it. let's go πŸ¦‹


✨ NAME ✨

asmc β€” the Asmc Macro Assembler. that's it, that's the girl. πŸŽ€


🌸 SYNOPSIS 🌸

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

literally just: options, filename, options, filename, repeat until you're happy, then optionally hand off to the linker. the way she just keeps accepting more files? main character energy fr. πŸ’…


🫢 DESCRIPTION 🫢

Asmc Macro Assembler. that's the whole description and honestly? she said "I contain multitudes, look at the OPTIONS section." and she's right. πŸ‘‘


πŸ’– OPTIONS πŸ’–

so this is the part where it gets long. do not panic. we're gonna go through every single one. every flag, every default, every letter. no skipping, no cap. πŸ™ˆ

  • -{0|1|..|10}[p] β€” sets the CPU target, bestie. pick your vibe: 0=8086 (this is the default, she's a classic), 1=80186, 2=80286, 3=80386, 4=80486, 5=Pentium, 6=PPro, 7=P2, 8=P3, 9=P4, 10=x86-64. tack a p on the end and you get to use privileged instructions. (yes that's as dangerous as it sounds. behave. πŸ”₯)
  • -arch:option β€” tells her which architecture to generate code for. valid options are: IA32, SSE, SSE2, AVX, AVX2, and AVX512. pick one, slay. ✨
  • -assert β€” generates .assert code. asserting your dominance over your own assertions. πŸ’…
  • -autostack β€” calculates the stack space your arguments are gonna need. she does the math so you don't have to, and math is her passion. 🧚
  • -bin β€” generates a plain binary file. raw. unfiltered. no container, no ceremony. πŸ’€
  • -Blfilename β€” selects an alternate linker, the one living at filename. yes, the filename is glued right onto the flag. iykyk.
  • -c β€” assembles only. does no linking. she does her part and then she's DONE, she is not doing your linker's job for them. 🚫
  • -Cs β€” pushes user registers before the stack-frame gets created in a proc. order matters, periodt.
  • -coff β€” generates a COFF format object file. windows girlies rise up. πŸͺŸ
  • -C{p|u|x} β€” sets OPTION CASEMAP. and here are the flavors:
    • -Cp β€” preserves the case of all user identifiers. she remembers EVERYTHING exactly how you wrote it. πŸ’…
    • -Cu β€” maps all identifiers to upper case. this one is the default. (yeah, all caps by default, she's been yelling this whole time 😭)
    • -Cx β€” preserves case in public and extern symbols. selective memory, love that for her.
  • -Dsymbol[=value] β€” defines a text macro with the given symbol name. if the value is missing, it's just blank, no drama. and heads up: if you've got multiple tokens separated by spaces, you must wrap them in quotation marks. she will not be guessing what you meant. πŸ™ˆ
  • -dotname β€” allows identifier names to begin with a period. little dots, big freedom. ⭐
  • -enumber β€” sets the error limit to number. after that many errors she's tapping out. 😭
  • -elf[64] β€” generates an ELF object file, and there's a little family here:
    • -elf β€” generates a 32-bit ELF object file.
    • -elf64 β€” generates a 64-bit ELF object file.
  • -endbr β€” inserts ENDBR at function entry. ending branches, starting beef. πŸ¦‹
  • -EP β€” generates a preprocessed source listing, and it gets sent to STDOUT. see also -Sf. ✨
  • -eq β€” don't display error messages. ignorance is bliss, technically. πŸ™ˆ
  • -Fd[file] β€” writes an import definition file. the file part is optional, she's flexible like that.
  • -Fifile β€” forces file to be included. no negotiations, it's going in. πŸ’…
  • -Fl[filename] β€” generates an assembled code listing. see -Sf. ✨
  • -Fofilename β€” names an object file. and listen: in case of wildcard, * may be used for the current file. πŸ‘‘
  • -fpc β€” disallows floating-point instructions. no floats allowed. she's putting her foot down. 🚫
  • -FPi β€” generates emulator fix-ups for floating-point arithmetic. this is mixed language only, so don't get cute with it.
  • -FPi87 β€” 80x87 instructions. this is the default, so this is the energy she's on unless you say otherwise.
  • -fpic, -fno-pic β€” enables or disables the generation of position-independent code for ELF64. the default is -fno-pic. note that's two separate flags, one turns it on, one turns it off. πŸ’–
  • -fpn β€” sets the FPU as n: 0=8087, 2=80287, 3=80387. (notice there's no 1 in that list. that's not a typo, that's just how it is, bestie.)
  • -frame β€” auto generates unwind information. she's got your back, literally, for when things unwind. 🧚
  • -Fwfilename β€” sets the errors file name to filename. errors, but make them a document. πŸ“„
  • -G{c|d|z|v|s} β€” Pascal, C, Std/Vector/Sys-call. the whole calling-convention friend group:
    • -Gc β€” specifies use of FORTRAN-style or Pascal-style function calling and naming conventions.
    • -Gd β€” specifies use of C-style function calling and naming conventions.
    • -Gz β€” specifies use of STDCALL-style function calling and naming conventions. this one defines STDCALLSUPPORTED. ✨
    • -Gv β€” specifies use of VECTORCALL-style function calling and naming conventions.
    • -Gs β€” specifies use of SYSCALL (System V)-style function calling and naming conventions.
  • -Ge β€” emits a conditional _chkstk() inside the prologue. conditional!! in the prologue!! πŸ’…
  • -help β€” displays a summary of Asmc command-line syntax and options. the classic "help me help you" moment. 🫢
  • -homeparams β€” forces parameters that were passed in registers to be written to their locations on the stack upon function entry. they're coming home. 🏠
  • -Ipathname β€” sets pathname for include files. she needs to know where to look. πŸ‘€
  • -idd[t] β€” assemble as binary data, or text. two moods:
    • -idd β€” assemble source as binary data.
    • -iddt β€” assemble source as a text file.
  • -logo β€” prints the logo string and exits. that's it. that's the whole job. she said "look at my logo" and left. πŸ’€
  • -m{t|s|c|m|l|h|f} β€” sets the memory model. lowercase letters, big responsibilities.
  • -mz β€” generates a DOS MZ binary file. retro moment, we love to see it. πŸ•ΉοΈ
  • -MD[d] β€” use for dynamic linking. defines _MSVCRT. and if you add the d, it also defines _DEBUG. two for one. πŸŽ€
  • -MT[d] β€” use for static linking. defines _MT. and again, add the d and it also defines _DEBUG. consistent queen. πŸ’–
  • -ncname β€” sets the class name of the code segment as name.
  • -ndname β€” sets the name of the data segment as name.
  • -nmname β€” sets the name of the module as name.
  • -ntname β€” sets the name of the text segment as name. (that's four segment/name flags in a row and yes, they all do slightly different things, keep up bestie ✨)
  • -nolib β€” ignores the INCLUDELIB directive. you said not today and she respects it.
  • -pe{c|g|d} β€” generates a PE binary file, 32/64-bit. and the letters mean: c=CUI (this is the default), g=GUI, d=DLL. pick your flavor. 🌈
  • -q β€” suppresses messages for successful assembly. only the good news gets deleted. silent but successful. 🀫
  • -nologo β€” suppresses the copyright message. (opposite energy from -logo, iconic.) πŸŽ€
  • -r β€” recurse subdirectories when using wildcards. she will go deeper. πŸŒ€
  • -Sa β€” turns on listing of all available information. ALL of it. she's not holding back. πŸ‘‘
  • -safeseh β€” marks the object as either containing no exception handlers, or containing exception handlers that are all declared with SAFESEH. safety first, always. πŸ›‘οΈ
  • -Sf β€” adds first-pass listing to the listing file. first pass, best pass. ✨
  • -Sg β€” turns on listing of assembly-generated code. look at what she made!! 😭
  • -Sn β€” turns off the symbol table when producing a listing. she's being mysterious. πŸ™ˆ
  • -Spn β€” sets segment alignment as n.
  • -stackalign β€” aligns stack variables to 16-byte. neat, tidy, aligned. πŸ’…
  • -sysvregs β€” ignores RDI and RSI in USES for Linux64. linux girlies, this one's for you. 🐧
  • -Sx β€” turns on false conditionals in the listing. she's showing you the paths not taken. πŸ’€
  • -w β€” same as -W0 -WX. that's it, she's just those two in a trench coat. (which, reminder: -WX makes warnings into errors, so this is a spicy combo. πŸ”₯)
  • -Wlevel β€” sets the warning level, where level = 0, 1, 2, or 3. four settings, choose your chaos. 🌸
  • -win64 β€” generates a 64-bit COFF object. defines _WIN64. πŸͺŸ
  • -wsCodePage β€” stores quoted CodePage as Unicode. defines _UNICODE. ✨
  • -WX β€” treats all warnings as errors. no warnings allowed, only consequences. ⚠️
  • -X β€” ignores the INCLUDE environment path. she's not taking directions from the environment today.
  • -Z7 β€” adds full symbolic debugging information. everything, documented. πŸ“
  • -zcw β€” no decoration for C symbols. undecorated, unbothered. πŸ’…
  • -Zd β€” generates line-number information in the object file. so you know exactly which line did that. πŸ”
  • -Zf β€” makes all symbols public. everyone's invited. πŸŽ‰
  • -zf{0|1} β€” sets the FASTCALL type: MS/OW. two options, no in-between.
  • -Zg β€” generates code to match Masm. matching the ex, respectfully. πŸ’€
  • -Zi{0|1|2|3}{|5|8} β€” adds symbolic debugging information. (yes the brace situation is a little unhinged, that's literally how it's written, don't @ her. 😭)
  • -zlc β€” no OMF records of data in code. πŸ“¦
  • -zld β€” no OMF records of far call. πŸ“¦
  • -Zm β€” enables MASM 5.10 compatibility. vintage era unlocked. πŸ•°οΈ
  • -Zv8 β€” enables Masm v8+ PROC visibility. πŸ‘€
  • -Zne β€” disables syntax extensions that aren't supported, and enables syntax that's supported by Masm. trading one for the other.
  • -zl{f|p|s} β€” suppress items in COFF. the whole suppression collection:
    • -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.
  • -Zp[alignment] β€” packs structures of the specified byte boundary by alignment. snug. πŸ«‚
  • -Zs β€” performs a syntax check only. she's reading, not committing. πŸ’…
  • -zt{0|1|2} β€” sets STDCALL decoration: FULL (the default), NONE, and HALF. three levels of decorated. πŸŽ€
  • -zze β€” no export symbol decoration. 🚫
  • -zzs β€” stores the name of the start address. ✨

Copyright (C) 2011-2025 The Asmc Contributors. that's the whole section, and honestly? they earned it. 🫢


🌈 SEE ALSO 🌈


okay that's the whole page, you made it, I'm so proud of you πŸ₯Ή go assemble something iconic. this was the Asmc Macro Assembler, January 2025 edition, hanging out at the top of your terminal as ASMC(1) β€” no cap, she ate. βœ¨πŸ’…πŸŽ€πŸ¦‹