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 apon 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, andAVX512. pick one, slay. β¨-assertβ generates.assertcode. 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 atfilename. yes, thefilenameis 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 givensymbolname. if thevalueis 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 tonumber. 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. thefilepart is optional, she's flexible like that.-Fifileβ forcesfileto 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β80x87instructions. 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 forELF64. the default is-fno-pic. note that's two separate flags, one turns it on, one turns it off. π-fpnβ sets the FPU asn:0=8087,2=80287,3=80387. (notice there's no1in 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 tofilename. 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 definesSTDCALLSUPPORTED. β¨-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β setspathnamefor 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 thed, it also defines_DEBUG. two for one. π-MT[d]β use for static linking. defines_MT. and again, add thedand it also defines_DEBUG. consistent queen. π-ncnameβ sets the class name of the code segment asname.-ndnameβ sets the name of the data segment asname.-nmnameβ sets the name of the module asname.-ntnameβ sets the name of the text segment asname. (that's four segment/name flags in a row and yes, they all do slightly different things, keep up bestie β¨)-nolibβ ignores theINCLUDELIBdirective. 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 withSAFESEH. 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 asn.-stackalignβ aligns stack variables to 16-byte. neat, tidy, aligned. π-sysvregsβ ignoresRDIandRSIinUSESforLinux64. 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:-WXmakes warnings into errors, so this is a spicy combo. π₯)-Wlevelβ sets the warning level, wherelevel=0,1,2, or3. four settings, choose your chaos. πΈ-win64β generates a 64-bit COFF object. defines_WIN64. πͺ-wsCodePageβ stores quotedCodePageas Unicode. defines_UNICODE. β¨-WXβ treats all warnings as errors. no warnings allowed, only consequences. β οΈ-Xβ ignores theINCLUDEenvironment 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 byalignment. snug. π«-Zsβ performs a syntax check only. she's reading, not committing. π-zt{0|1|2}β sets STDCALL decoration:FULL(the default),NONE, andHALF. three levels of decorated. π-zzeβ no export symbol decoration. π«-zzsβ stores the name of the start address. β¨
π COPYRIGHT π
Copyright (C) 2011-2025 The Asmc Contributors. that's the whole section, and honestly? they earned it. π«Ά
π SEE ALSO π
- Online manual β
https://github.com/nidud/asmc/blob/master/readme.mdπ asmc_linuxβhttps://github.com/nidud/asmc_linuxπ§asmcβhttps://github.com/nidud/asmcπ
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. β¨π ππ¦
π¦ where this page comes from
- debian trixie: asmc-linux 0.0~git20250329.4ee70bd+ds-2 Β· GPL-2.0-or-later
- ubuntu questing: asmc-linux 0.0~git20250329.4ee70bd+ds-2
- ubuntu resolute: asmc-linux 0.0~git20250329.4ee70bd+ds-5 Β· GPL-2.0-or-later
- ubuntu stonking: asmc-linux 2.39.07+ds-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms