MC(1)

πŸ“¦ version 0.3.1, in nixos 26.05, nixpkgs unstable

πŸŽ€ MC(1) β€” General Commands Manual πŸŽ€

okay so bestie, welcome to the MC(1) manual page β€” General Commands Manual energy, compiler main-character moment, and the actual star of this page is 6m πŸ’…βœ¨

🌸 NAME 🌸

6m

(yes, that's the whole NAME section β€” iconic minimalism 🫢)

πŸ“œ SYNOPSIS πŸ“œ

here's the exact vibe-check line, no edits:

6m -[?hioSG9d] [file...]

πŸ’– DESCRIPTION πŸ’–

The ?m compiler family compiles Myrddin source into object files for the corresponding architecture. Each architecture gets its own compiler. Unless otherwise specified, if the input file is named filename.myr then the object file that is generated will be named filename.o.

Any text between the first + in the file name and the suffix are stripped. This functionality is used to specify system tags for tools like mbld.

If the filename does not end with the suffix .myr then the object suffix .o will simply be appended to it.

The following architectures are currently supported:

  • 6m β€” x86-64

The compiler options are:

  • -d [flTriu] β€” Print debugging dumps. Additional options may be given to give more debugging information for specific intermediate states of the compilation. The little bracket crew is literally flTriu 🫢
  • -h, -? β€” Print a summary of the available options.
  • -I path β€” Add path to the search path for unquoted use statements. This option does not affect the search path for local usefiles, which are always searched relative to the directory containing the output file. Without any options, the search path defaults to /usr/include/myr.
  • -o output-file β€” Specify that the generated code should be placed in output-file instead of the default location.
  • -S β€” Generate assembly code along with the object file.
  • -G β€” Generate assembly in the Gnu As syntax.
  • -O out β€” Output code to output path out.
  • -T β€” Compile in test mode. This implies that pkglocal functions are available.
  • -9 β€” Generate assembly in the Plan 9 syntax.

🌈 EXAMPLE 🌈

copy-paste this little ritual, bestie:

6m foo.myr
6m bar.myr
ld -o foobar foo.o bar.o

πŸ“ FILES πŸ“

The source code for this compiler is available from:

git://git.eigenstate.org/git/ori/mc.git

πŸ‘€ SEE ALSO πŸ‘€

πŸ’€ BUGS πŸ’€

okay bestie, the caveats are real and we are not pretending otherwise:

  • The language is not yet complete, and the compilers often omit useful constructs in spite of their desirability.
  • There are virtually no optimizations done, and the generated source is often very poorly performing.
  • The current calling convention is stack-based and not register-based, even on architectures where it should be register-based.
  • The calling convention is not compatible with C.

byeee πŸ’– this was the MC(1) manual page. The footer has no extra source/version/date flex β€” it's just the MC(1) manual tag β€” so we're signing off from MC(1). Stay slaying, and may your object files link on the first try 🫢✨

πŸ“¦ where this page comes from