# Andere Prüfungseinstellungen

There are a some additional options related to command-line execution.

## The `-load` command-line parameter

A more complex circuit might include a RAM component that needs to be loaded with a program in order for the circuit to have anything to do. You can specify a memory image file at the command line, which will be loaded into any RAM component in the circuit before simulation begins. (This does not work when loading the GUI - it is only for command-line execution.)

> `java -jar logisim-filename.jar cpu.circ -tty table -load mem-image.txt`

The order of the parameters is not important (except the `table` parameter must be immediately after `-tty`, and the memory image's filename must be immediately after `-load`). The memory image file should be in Logisim's memory image format.

Logisim searches for RAM recursively, so this will still work if RAM is nested within a subcircuit. There is no way, though, to distinguish different RAM components: Logisim will attempt to load the same file into every RAM that it can find.

## Options for the `-tty` parameter

In our examples thus far, we've always used `-tty table` to indicate that a table of output values should be displayed. You can customize the behavior in other ways by listing one or more options, separated by commas. For instance, you might write `-tty table,halt,speed`, and the program will perform all three behaviors listed below. (The order in which they are listed does not matter.)

`halt`

  After the simulation ends, a one-line message is displayed explaining why the simulation ended. Error conditions - such as a detected oscillation - are displayed in any case.

`speed`

  If you use `speed` in conjunction with `-tty`, then after completing the simulation Logisim will display a summary of how quickly the circuit was simulated, such as:

  > `714 Hz (509 ticks in 712 milliseconds)`

  Note that displaying information during the simulation makes the simulation go much slower. As just one comparison, the same circuit and image ran at 714 Hz above with just the `speed` option but 490 Hz with the `table` option as well.

`stats`

  Shows a tab-delimited table containing statistics about components used by the top-level main circuit in the project. The table includes four columns:

  - Unique: The number of times that component appears in the circuit's hierarchy, where each subcircuit within the hierarchy is counted only once.
  - Recursive: The number of times that component appears in the circuit's hierarchy, where we count each subcircuit as many times as it appears in the hierarchy.
  - Component: The name of the component.
  - Library: The name of the library from which the component came.

  The distinction between Unique and Recursive is explained further under Project menu section. If the file uses circuits from a loaded Logisim library, those components are considered to be black boxes: The contents of the library's circuits are not included in the unique and recursive counts.

  (This feature can be useful for instructors who assign students to build projects using a subset of Logisim's libraries.)

`table`

  (as already discussed)

`tty`

  Any TTY components send their output to the display (standard output), and any information typed at the keyboard is sent to all Keyboard components in the circuit. These components are included even if they are nested deeply in the subcircuit hierarchy.

Next: Testing multiple files.