mixasm, the MIXAL assembler
***************************

MIX programs, as executed by mixvm, are composed of binary instructions loaded into the virtual machine memory as MIX words. Although you could write your MIX programs directly as a series of words in binary format, you have at your disposal a more friendly assembly language, MIXAL (see MIXAL) which is compiled into binary form by mixasm, the MIXAL assembler included in MDK. In this chapter, you will find a complete description of mixasm options.

Invoking mixasm
===============

In its simplest form, mixasm is invoked with a single argument, which is the name of the MIXAL file to be compiled, e.g.

     mixasm hello

will compile either hello or hello.mixal, producing a binary file named hello.mix if no errors are found.

In addition, mixasm can be invoked with the following command line options (note, that, following GNU's conventions, we provide a long option name for each available single letter switch):

     mixasm [-vhulO] [-o OUTPUT_FILE] [--version] [--help] [--usage]
            [--ndebug] [--output=OUTPUT_FILE] [--list[=LIST_FILE]] file

The meaning of these options is as follows:

 -- User Option: -v
 -- User Option: --version
     Prints version and copyleft information and exits.

 -- User Option: -h
 -- User Option: --help
 -- User Option: -u
 -- User Option: --usage
     Prints a summary of available options and exits.

 -- User Option: -O
 -- User Option: --ndebug
     Do not include debugging information in the compiled file, saving space but disallowing breakpoint setting at source level and symbol table inspection under mixvm.

 -- User Option: -o output_file
 -- User Option: --output=output_file
     By default, the given source file FILE.MIXAL is compiled into FILE.MIX. You can provide a different name for the output file using this option.

 -- User Option: -l
 -- User Option: --list[=list_file]
     This option causes mixasm to produce, in addition to the .mix file, an ASCII file containing a summary of the compilation results. The file is named after the MIXAL source file, changing its extension to .mls if no argument is provided; otherwise, the listing file is named according to the argument.