Next: , Previous: Compiling, Up: Getting started


3.3 Running the program

MIX is a mythical computer, so it is no use ordering it from your favorite hardware provider. mdk provides three software simulators of the computer, though. They are

All three simulators accept the same set of user commands, but offer a different user interface, as noted above. In this section we shall describe some of these commands, and show you how to use them from mixvm's command line. You can use them as well at gmixvm's command prompt (see gmixvm), or using the built-in Scheme primitives of mixguile (see Using mixguile).

Using the MIX simulators, you can run your MIXAL programs, after compiling them with mixasm into binary .mix files. mixvm can be used either in interactive or non-interactive mode. In the second case, mixvm will load your program into memory, execute it (producing any output due to MIXAL OUT instructions present in the program), and exit when it encounters a HLT instruction. In interactive mode, you will enter a shell prompt which allows you issuing commands to the running virtual machine. This commands will permit you to load, run and debug programs, as well as to inspect the MIX computer state (register contents, memory cells contents and so on).