next up previous
Next: Terminal Interface Up: SPIM Previous: Simulation of a Virtual

SPIM Interface

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:

-bare
Simulate a bare MIPS machine without pseudoinstructions 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.

-pseudo
Accept pseudoinstructions in assembly code.

-nopseudo
Do not accept pseudoinstructions in assembly code.

-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.

-trap_file
Load the trap handler in the file.

-noquiet
Print a message when an exception occurs. This is the default.

-quiet
Do not print a message at an exception.

-nomapped_io
Disable the memory-mapped IO facility (see Section 5).

-mapped_io
Enable the memory-mapped IO facility (see Section 5). Programs that use SPIM syscalls (see Section 1.5) to read from the terminal should not also use memory-mapped IO.

-file
Load and execute the assembly code in the file.

-s seg 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.




next up previous
Next: Terminal Interface Up: SPIM Previous: Simulation of a Virtual
Ian Moor
1998-09-11