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 a.out
executable file into SPIM's memory.
-
- run <addr>
Start running a program. If the
optional address 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.
Mitch Roth
Fri Sep 6 23:25:26 ADT 1996