3.2 Executing MIX Programs.

When run without command line options, mixsim reads a load deck from device 16, loads and executes it, writing any error messages to stderr. On completion, a dump of the machine state is written to stderr. If mixsim is interrupted during execution, the machine state will be dumped to stderr.

At most one argument can be given. It is treated as a file name to be assigned to the card reader device. Thus, there are three ways to execute a load deck previously stored in a file:

  1. Redirect the file's contents to the mixsim stdin:
     
    $ mixsim < hello.deck
    
  2. Give the file name as an argument to mixsim:
     
    $ mixsim hello.deck
    
  3. Assign the file to device ‘#16’, using ‘-a’ option (see below):
     
    $ mixsim -a 16=hello.deck
    

The default device assignments can be changed using ‘--assign-device’ (‘-a’) command line option. It takes a single argument in the form dev=file, where dev is the MIX device number and file is the name of file to be assigned to it. For example, the following invocation tells mixsim to connect the card puncher (device 17) to file ‘punch.out’:

 
$ mixsim --assign 17=punch.out