Next: X-Window Interface
Up: SPIM Interface
Previous: SPIM Interface
The terminal interface (spim) provides the following commands:
-
- exit
Exit the simulator.
-
- read "file"
Read file of assembly
language commands into SPIM's memory. If the file has already been
read into SPIM, the system should be cleared (see reinitialize,
below) or global symbols will be multiply defined.
-
- load "file"
Synonym for read.
-
- execute "a.out"
Read the MIPS executable file
a.out into SPIM's memory.
-
- run <addr>
Start running a program. If the
optional address addr is provided, the program starts at that
address. Otherwise, the program starts at the global symbol
__start, which is defined by the default trap handler to call the
routine at the global symbol main with the usual MIPS calling
convention.
-
- step <N>
Step the program for N
(default: 1) instructions. Print instructions as they execute.
-
- continue
Continue program execution without
stepping.
-
- print $N
Print register N.
-
- print $fN
Print floating point register
N.
-
- print addr
Print the contents of memory at
address addr.
-
- print_sym
Print the contents of the symbol
table, i.e., the addresses of the global (but not local) symbols.
-
- reinitialize
Clear the memory and registers.
-
- breakpoint addr
Set a breakpoint at address
addr. addr can be either a memory address or symbolic
label.
-
- delete addr
Delete all breakpoints at address
addr.
-
- list
List all breakpoints.
-
- .
Rest of line is an assembly instruction
that is stored in memory.
-
- <nl>
A newline reexecutes previous command.
-
- ?
Print a help message.
Most commands can be abbreviated to their unique prefix e.g.,
ex, re, l, ru, s, p. More dangerous
commands, such as reinitialize, require a longer prefix.
Antony Hosking
Fri Apr 12 10:48:03 EST 1996