Node:Invocation, Next:, Previous:mixvm, Up:mixvm



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:

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

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

-r User Option
-run User Option
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.

-d User Option
-dump User Option
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.

-t User Option
-time User Option
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:

-q User Option
-noinit User Option
Do not load the Guile initialisation file ~/.mdk/mixguile.scm at startup.