0da1c5dcca
First commit of the 4.5 version (latest version available)
84 lines
7.1 KiB
HTML
84 lines
7.1 KiB
HTML
<html>
|
|
<title>MARS 4.5 help contents
|
|
</title>
|
|
<body>
|
|
<center>
|
|
<h3>MARS - Mips Assembly and Runtime Simulator</h3>
|
|
<h4>Release 4.5</h4>
|
|
<h4>August 2014</h4>
|
|
<h4>Configuration Settings</h4>
|
|
</center>
|
|
|
|
Releases 3.0 and later include a Settings menu. The Editor and Exception Handler items launch a dialog but the rest are each
|
|
controlled by a checkbox for selecting or deselecting it (checked means true, unchecked means false). Settings and their default
|
|
values are:
|
|
<ol>
|
|
<li><b>Display the Labels window in the Execute tab.</b> Default value is <b>false</b>. If selected, the Labels window,
|
|
which shows the name and associated address for each label defined in the program, will be
|
|
displayed to the right of the Text Segment.</li>
|
|
<li><b>Provide program arguments to the MIPS program.</b> Default value is <b>false</b>. New in Release 3.5.
|
|
If selected, a text field will appear at the top of the Text Segment Display. Any argument values in this
|
|
text field at the time of program execution will be stored in MIPS memory prior to execution. The argument
|
|
count (argc) will be placed in register $a0, and the address of an array of null-terminated strings containing
|
|
the arguments (argv) will be placed in register $a1. These values are also available on the runtime stack ($sp).
|
|
<li><b>Popup Dialog for input syscalls (5,6,7,8,12).</b> New in Release 4.0. Default value is <b>false</b>. If selected, runtime console
|
|
input will be entered using popup dialogs (this was the only option prior to Release 4.0). Otherwise, input is entered
|
|
directly into the Run I/O tab at the bottom of the screen.</li>
|
|
<li><b>Display memory addresses in hexadecimal.</b> Default value is <b>true</b>. If deselected, addresses will be displayed in decimal.
|
|
This setting can also be toggled in a checkbox on the lower border of the Data Segment Window.</li>
|
|
<li><b>Display memory and register contents in hexadecimal.</b> Default value is <b>true</b>. If deselected, vlaues will be displayed in decimal.
|
|
This setting can also be toggled in a checkbox on the lower border of the Data Segment Window.</li>
|
|
<li><b>Assemble a file automatically as soon as it is opened,</b> and initialize the File Open dialog with the most-recently opened file.
|
|
Default value is <b>false</b>. This is convenient if you use an external editor for composing your programs.</li>
|
|
<li><b>Assemble applies to all files in directory.</b> Default value is <b>false</b>.
|
|
If selected, the file currently open in the
|
|
editor will become the "main" program in a multi-file assemble-and-link operation involving all
|
|
assembly files (*.asm; *.s) in its directory. If successful, execution will begin with the currently open file. </li>
|
|
<li><b>Assembler warnings are considered errors.</b> Default value is <b>false</b>. New in Release 3.5.
|
|
If selected, the assemble operation will fail if any warnings are produced. At this time, all assembler warnings
|
|
relate to unrecognized or ignored directives. MARS may be able to assemble code produced by compilers for other MIPS
|
|
assemblers if this setting is deselected.
|
|
<li><b>Initialize Program Counter to global 'main' if defined.</b> Default value is <b>false</b>. New in Release 3.8.
|
|
If selected, the Program Counter will be initialized to the address of the text segment statement with the global label 'main' if it
|
|
exists. If it does not exist or if the setting is not selected, the Program Counter will be initialized to the default text segment
|
|
starting address.
|
|
<li><b>Permit programs to use extended (pseudo) instructions and formats.</b> Default value is <b>true</b>. This includes all memory addressing
|
|
modes other than the MIPS native mode (16 bit constant offset added to register content).</li>
|
|
<li><b>Assemble and execute programs using delayed branching.</b> Default value is <b>false</b>. MIPS processors use delayed branches
|
|
as part of the pipelined design, but it can be confusing to programmers. With delayed branching, the instruction
|
|
following a branch or jump instruction <i>will always be executed</i> even if the branch condition is true! Assemblers
|
|
and, failing that, programmers, often deal with this by following branches and jumps with a "<tt>nop</tt>" instruction. The MARS
|
|
assembler does <i>not</i> insert a <tt>nop</tt>. When delayed branching was introduced in Release 3.3, the machine code generated
|
|
for a branch instruction depended on this setting since
|
|
its target value is relative to the Program Counter (<i>PC-relative addressing</i>). Although technically correct, this led to
|
|
confusion in the MARS community because the generated code did not match textbook examples. Starting with Release 3.4, the relative branching
|
|
offset is always calculated as if delayed branching is enabled even when it is not. The runtime simulation adjusts accordingly.</li>
|
|
<li><b>Self-modifying code.</b> Default value is <b>false</b>. New in Release 4.4.
|
|
If selected, a running MIPS program can write to a user text segment address and can branch/jump to a user data segment address.
|
|
These capabilities permit a program to dynamically generate and/or modify its binary code. Also permits interactive modification of
|
|
text segment contents through either the Data Segment or Text Segment windows.
|
|
<li><b>The Editor dialog.</b> Use it to view and modify editor font settings. New with Release 3.3.</li>
|
|
<li><b>The Highlighting dialog.</b> Use it to modify color and font settings for the highlighting of table items in the
|
|
Text Segment window, Data Segment window, Registers window, Coprocessor0 window and Coprocessor1 window.
|
|
Highlighting occurs during timed, stepped, and backstepped simulation. Color and font for normal (non-highlighted)
|
|
display can also be set separately for even-numbered and odd-numbered display rows but not individually by windows.
|
|
New with Release 3.6.</li>
|
|
<li><b>The Exception Handler dialog.</b> It has the setting: Include this
|
|
exception handler in all assemble operations. Default value is <b>false</b>. If selected, a button to browse to the desired
|
|
file is enabled. New with Release 3.2</li>
|
|
<li><b>The Memory Configuration dialog.</b> Use it to select from among available MIPS address space configurations.
|
|
The default configuration is derived from SPIM; it was only one available from MARS 1.0 through MARS 3.6.
|
|
New with Release 3.7.
|
|
</ol>
|
|
Beginning with Release 3.2, settings are retained from one interactive session to the next. Settings are stored in a system-dependent
|
|
way as specified by <tt>java.util.prefs.Preferences</tt>. Windows systems use the Registry.
|
|
These settings are independent of command options given when using MARS from a command line;
|
|
neither affects the other. We anticipate future releases will include additional settings and preferences.
|
|
<p>
|
|
|
|
<hr>
|
|
<p>
|
|
This document is available for printing on the MARS home page
|
|
<tt><b>http://www.cs.missouristate.edu/MARS/</b></tt>.
|
|
</body>
|
|
</html> |