Next: Terminal Interface
Up: SPIM S20: A MIPS
Previous: Simulation of a Virtual
SPIM provides both a simple terminal and a X-window interface. Both
provide equivalent functionality, but the X interface is superior.
spim, the terminal version, and xspim, the X version, have
the following command-line options:
-
- -bare
Simulate a bare MIPS machine without
pseudo instructions or the additional addressing modes provided by the
assembler. Implies -quiet.
-
- -asm
Simulate the virtual MIPS machine
provided by the assembler. This is the default.
-
- -notrap
Do not load the standard trap
handler. This trap handler has two functions that must be assumed by
the user's program. First, it handles traps. When a trap occurs,
SPIM jumps to location 0x80000080, which should contain code to
service the exception. Second, this file contains startup code that
invokes the routine main. Without the trap handler, execution
begins at the instruction labeled __start.
-
- -trap
Load the standard trap handler. This
is the default.
-
- -noquiet
Print a message when an exception
occurs. This is the default.
-
- -quiet
Do not print a message at an
exception.
-
- -file
Load and execute the assembly code in
the file.
-
- -execute
Load and execute the code in the
MIPS executable file a.out. The program cannot invoke any
operating system services (e.g., input or output) since SPIM does not
simulate the MIPS kernel traps.
-
- -sseg size Sets the initial size of
memory segment seg to be size bytes. The memory
segments are named: text, data, stack, ktext,
and kdata. For example, the pair of arguments -sdata
2000000 starts the user data segment at 2,000,000 bytes.
-
- -lseg size Sets the limit on how large
memory segment seg can grow to be size bytes. The
memory segments that can grow are: data, stack, and
kdata.
Mitch Roth
Fri Sep 6 23:25:26 ADT 1996