File: spim.man

package info (click to toggle)
spim 6.1-3
  • links: PTS
  • area: non-free
  • in suites: hamm, slink
  • size: 1,944 kB
  • ctags: 2,839
  • sloc: asm: 10,339; ansic: 9,404; yacc: 1,867; makefile: 713; lex: 583; sh: 95
file content (91 lines) | stat: -rw-r--r-- 4,387 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.\" $Header: /afs/cs.wisc.edu/p/larus/Software/larus/SPIM/RCS/spim.man,v 1.2 1994/11/21 16:08:06 larus Exp $
.TH spim 1
.SH NAME
spim \- A MIPS R2000/R3000 Simulator
.SH SYNTAX
.B spim
[\|\fI-asm/-bare\fP \fI-trap/-notrap\fP \fI-quiet/-noquiet\fP
\fI-mapped_io/-nomapped_io\fP
.br
\fI-stext size\fP \fI-sdata size\fP  \fI-sstack size\fP \fI-sktext
size\fP \fI-skdata size\fP
\fI-ldata size\fP \fI-lstack size\fP \fI-lkdata size\fP
.br
\fI-file file <args>\fP \fI-execute file <args>\fP \|]
.SH DESCRIPTION
SPIM S20 is a simulator that runs programs for the MIPS R2000/R3000
RISC computers. (For a description of the real machines, see Gerry
Kane and Joe Heinrich, \fIMIPS RISC Architecture,\fP Prentice Hall,
1992.) SPIM can read and immediately execute files containing assembly
language or MIPS executable files.  SPIM is a self-contained system
for running these programs and contains a debugger and interface to a
few operating system services.
.PP
SPIM comes in two versions.  The plain version is called \fIspim\fP.
It runs on any type of terminal.  It operates like most programs of
this type: you type a line of text, hit the \fIreturn\fP key, and
\fIspim\fP executes your command.  The fancier version of SPIM is
called \fIxspim\fP.  It uses the X-window system, so you must have a
bit-mapped display to run it.  \fIxspim\fP, however, is a much easier
program to learn and use because its commands are always visible on
the screen and because it continually displays the machine's
registers.
.SH OPTIONS
\fIspim\fP has many options:
.IP \fB-asm\fP 10
Simulate the virtual MIPS machine provided by the assembler.  This is
the default.
.IP \fB-bare\fP 10
Simulate a bare MIPS machine without pseudo-instructions or the
additional addressing modes provided by the assembler.  Implies
\fI-quiet\fP.
.IP \fB-trap\fP 10
Load the standard exception handler and startup code.  This is the default.
.IP \fB-notrap\fP 10
Do not load the standard exception handler and startup code.  This
exception handler handles exceptions.  When an exception occurs, SPIM
jumps to location 0x80000080, which must contain code to service the
exception.  In addition, this file contains startup code that invokes
the routine \fImain\fP.  Without the startup routine, SPIM begins
execution at the instruction labeled \fI__start\fP.
.IP \fB-quiet\fP 10
Print a message when an exception occurs.  This is the default.
.IP \fB-noquiet\fP 10
Do not print a message at exceptions.
.IP \fB-mapped_io\fP 10
Enable the memory-mapped IO facility.  Programs that use SPIM syscalls
to read from the terminal \fBcannot\fP also use memory-mapped IO.
.IP \fB-nomapped_io\fP 10
Disable the memory-mapped IO facility.
.IP "\fB-stext size\fP \fB-sdata size\fP \fB-sstack size\fP \fB-sktext size\fP \fB-skdata size\fP" 10
Sets the initial size of memory segment \fPseg\fP to be \fIsize\fP
bytes.  The memory segments are named: \fItext\fP, \fIdata\fP,
\fIstack\fP, \fIktext\fP, and \fIkdata\fP.  The \fItext\fP segment
contains instructions from a program.  The \fIdata\fP segment holds
the program's data.  The \fIstack\fP segment holds its runtime stack.
In addition to running a program, SPIM also executes system code that
handles interrupts and exceptions.  This code resides in a separate
part of the address space called the \fIkernel\fP.  The \fIktext\fP
segment holds this code's instructions and \fIkdata\fP holds its data.
There is no \fIkstack\fP segment since the system code uses the same
stack as the program.  For example, the pair of arguments \fI-sdata
2000000\fP starts the user data segment at 2,000,000 bytes.
.IP "\fB-ldata size\fP \fB-lstack size\fP \fB-lkdata size\fP" 10
Sets the limit on how large memory segment \fIseg\fP can grow to be
\fIsize\fP bytes.  The memory segments that can grow are \fIdata\fP,
\fIstack\fP, and \fIkdata\fP.
.IP "\fB-file file <args>\fP" 10
Load and execute the assembly code in the file with arguments \fB<args>\fP.
.IP "\fB-execute file <args>\fP" 10
Load and execute the MIPS \fIexecutable\fP (a.out) file with arguments
\fB<args>\fP. Only works on systems using a MIPS processors.
.SH "BUGS"
Instruction opcodes cannot be used as labels.
.SH "SEE ALSO"
xspim(1)
.br
James R. Larus, ``SPIM S20: A MIPS R2000 Simulator,''
included with SPIM distribution.
.SH AUTHOR
James R. Larus (larus@cs.wisc.edu), Computer Sciences Department,
University of Wisconsin\-Madison.