Next: , Previous: mixvm, Up: mixvm


6.1 Invoking mixvm

mixvm 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):

     mixvm [-vhurdtq] [--version] [--help] [--usage] [--run] [--dump]
           [--time] [--noinit]  [FILE[.mix]]

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: -r
— User Option: –run

Loads the specified FILE and executes it. After the program execution, mixvm exits. FILE must be the name of a binary .mix program compiled with mixasm. If your program does not produce any output, use the -d flag (see below) to peek at the virtual machine's state after execution.

— User Option: -d
— User Option: –dump

This option must be used in conjuction with -r, and tells mixvm to print the value of the virtual machine's registers, comparison flag and overflow toggle after executing the program named FILE. See See Non-interactive mode, for sample usage.

— User Option: -t
— User Option: –time

This option must be used in conjuction with -r, and tells mixvm to print virtual time statistics for the program's execution.

When run without the -r flag, mixvm enters its interactive mode, showing you a prompt like this one:

     MIX >

and waiting for your commands (see Commands). If the optional FILE argument is given, the file FILE.mix will be loaded into the virtual machine memory before entering the interactive mode.

The first time mixvm is invoked, a directory named .mdk is created in your home directory. It contains the mixvm configuration file, the command history file and (by default) the block devices files (see Devices). Before showing you the command prompt, mixvm looks in the ~/.mdk directory for a file named mixguile.scm; if it exists, it is read and evaluated by the embedded Guile interpreter (see Defining new functions). You can use the -q command line option to skip this file loading:

— User Option: -q
— User Option: –noinit

Do not load the Guile initialisation file ~/.mdk/mixguile.scm at startup.