SPIM provides a simple terminal and a X-window interface. Both
provide equivalent functionality, but the X interface is generally
easier to use and more informative.
spim, the terminal version, and xspim, the X version, have
the following command-line options:
Simulate a bare MIPS machine without
pseudoinstructions or the additional addressing modes provided by the
assembler. Implies -quiet -delayed_branches -delayed_loads.
Simulate the virtual MIPS machine
provided by the assembler. This is the default.
Simulate the branch delay
feature of bare MIPS machines; the instruction following a branch is
always executed, even if the branch succeeded.
Simulate the load delay
feature of bare MIPS machines; a value loaded from memory is not
available in the register until two instruction cycles after the load.
Accept pseudoinstructions in assembly
Do not accept pseudoinstructions in
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.
Load the standard trap handler. This
is the default.
Load the trap handler in the file.
Print a message when an exception
occurs. This is the default.
Do not print a message at an
Disable the memory-mapped IO
facility (see Section ).
Enable the memory-mapped IO facility
(see Section ). Programs that use SPIM syscalls (see
Section ) to read from the terminal should not also use
Load and execute the assembly code in
- -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.