Next: , Previous: Invocation, Up: mixvm


6.2 Interactive commands

You can enter the interactive mode of the MIX virtual machine by simply invoking mixvm without arguments. You will then be greeted by a shell prompt1

     MIX >

which indicates that a new virtual machine has been initialised and is ready to execute your commands. As we have already mentioned, this command prompt offers you command line editing facilities which are described in the Readline user's manual (chances are that you are already familiar with these command line editing capabilities, as they are present in many GNU utilities, e.g. the bash shell)2. In a nutshell, readline provides command completion using the TAB key and command history using the cursor keys. A history file containing the last commands typed in previous sessions is stored in the mdk configuration directory (~/.mdk).

As a beginner, your best friend will be the help command, which shows you a summary of all available MIX commands and their usage; its syntax is as follows:

mixvm command: help [command]

Prints a short description of the given command and its usage. If command is omitted, help prints the short description for all available commands.


Footnotes

[1] The default command prompt, ‘MIX > ’, can be changed using the prompt command (see Configuration commands)

[2] The readline functionality will be available if you have compiled mdk with readline support, i.e., if GNU readline is installed in your system. This is ofte the case in GNU/Linux and BSD systems