0da1c5dcca
First commit of the 4.5 version (latest version available)
760 lines
34 KiB
HTML
760 lines
34 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.6.0_33) on Tue Aug 20 12:20:00 EDT 2013 -->
|
|
<TITLE>
|
|
ProgramStatement
|
|
</TITLE>
|
|
|
|
<META NAME="date" CONTENT="2013-08-20">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="ProgramStatement";
|
|
}
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
<HR>
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../mars/ProcessingException.html" title="class in mars"><B>PREV CLASS</B></A>
|
|
<A HREF="../mars/Settings.html" title="class in mars"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../index.html?mars/ProgramStatement.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="ProgramStatement.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
mars</FONT>
|
|
<BR>
|
|
Class ProgramStatement</H2>
|
|
<PRE>
|
|
<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
|
|
<IMG SRC="../resources/inherit.gif" ALT="extended by "><B>mars.ProgramStatement</B>
|
|
</PRE>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public class <B>ProgramStatement</B><DT>extends <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
Represents one assembly/machine statement. This represents the "bare machine" level.
|
|
Pseudo-instructions have already been processed at this point and each assembly
|
|
statement generated by them is one of these.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>Pete Sanderson and Jason Bumgarner</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<P>
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<A NAME="constructor_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#ProgramStatement(int, int)">ProgramStatement</A></B>(int binaryStatement,
|
|
int textAddress)</CODE>
|
|
|
|
<BR>
|
|
Constructor for ProgramStatement used only for writing a binary machine
|
|
instruction with no source code to refer back to.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#ProgramStatement(mars.MIPSprogram, java.lang.String, mars.assembler.TokenList, mars.assembler.TokenList, mars.mips.instructions.Instruction, int, int)">ProgramStatement</A></B>(<A HREF="../mars/MIPSprogram.html" title="class in mars">MIPSprogram</A> sourceMIPSprogram,
|
|
<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> source,
|
|
<A HREF="../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A> origTokenList,
|
|
<A HREF="../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A> strippedTokenList,
|
|
<A HREF="../mars/mips/instructions/Instruction.html" title="class in mars.mips.instructions">Instruction</A> inst,
|
|
int textAddress,
|
|
int sourceLine)</CODE>
|
|
|
|
<BR>
|
|
Constructor for ProgramStatement when there are links back to all source and token
|
|
information.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#buildBasicStatementFromBasicInstruction(mars.ErrorList)">buildBasicStatementFromBasicInstruction</A></B>(<A HREF="../mars/ErrorList.html" title="class in mars">ErrorList</A> errors)</CODE>
|
|
|
|
<BR>
|
|
Given specification of BasicInstruction for this operator, build the
|
|
corresponding assembly statement in basic assembly format (e.g.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#buildMachineStatementFromBasicStatement(mars.ErrorList)">buildMachineStatementFromBasicStatement</A></B>(<A HREF="../mars/ErrorList.html" title="class in mars">ErrorList</A> errors)</CODE>
|
|
|
|
<BR>
|
|
Given the current statement in Basic Assembly format (see above), build the
|
|
32-bit binary machine code statement.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getAddress()">getAddress</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces Text Segment address where the binary machine statement is stored.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getBasicAssemblyStatement()">getBasicAssemblyStatement</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces Basic Assembly statement for this MIPS source statement.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getBinaryStatement()">getBinaryStatement</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces 32-bit binary machine statement as int.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../mars/mips/instructions/Instruction.html" title="class in mars.mips.instructions">Instruction</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getInstruction()">getInstruction</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces Instruction object corresponding to this statement's operator.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getMachineStatement()">getMachineStatement</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces binary machine statement as 32 character string, all '0' and '1' chars.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getOperand(int)">getOperand</A></B>(int i)</CODE>
|
|
|
|
<BR>
|
|
Produces operand value from given array position (first operand is position 0).</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int[]</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getOperands()">getOperands</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces int array of operand values for this statement.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getOriginalTokenList()">getOriginalTokenList</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces token list generated from original source statement.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getPrintableBasicAssemblyStatement()">getPrintableBasicAssemblyStatement</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces printable Basic Assembly statement for this MIPS source
|
|
statement.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getSource()">getSource</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces MIPS source statement.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getSourceFile()">getSourceFile</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces String name of the source file containing this statement.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getSourceLine()">getSourceLine</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces line number of MIPS source statement.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../mars/MIPSprogram.html" title="class in mars">MIPSprogram</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getSourceMIPSprogram()">getSourceMIPSprogram</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces MIPSprogram object representing the source file containing this statement.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#getStrippedTokenList()">getStrippedTokenList</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Produces token list stripped of all but operator and operand tokens.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#setBasicAssemblyStatement(java.lang.String)">setBasicAssemblyStatement</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> statement)</CODE>
|
|
|
|
<BR>
|
|
Assigns given String to be Basic Assembly statement equivalent to this source line.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#setBinaryStatement(int)">setBinaryStatement</A></B>(int binaryCode)</CODE>
|
|
|
|
<BR>
|
|
Assigns given int to be binary machine code equivalent to this source line.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#setMachineStatement(java.lang.String)">setMachineStatement</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> statement)</CODE>
|
|
|
|
<BR>
|
|
Assigns given String to be binary machine code (32 characters, all of them 0 or 1)
|
|
equivalent to this source line.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#setSource(java.lang.String)">setSource</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> src)</CODE>
|
|
|
|
<BR>
|
|
associates MIPS source statement.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../mars/ProgramStatement.html#toString()">toString</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Crude attempt at building String representation of this complex structure.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
|
<A NAME="constructor_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Constructor Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="ProgramStatement(mars.MIPSprogram, java.lang.String, mars.assembler.TokenList, mars.assembler.TokenList, mars.mips.instructions.Instruction, int, int)"><!-- --></A><H3>
|
|
ProgramStatement</H3>
|
|
<PRE>
|
|
public <B>ProgramStatement</B>(<A HREF="../mars/MIPSprogram.html" title="class in mars">MIPSprogram</A> sourceMIPSprogram,
|
|
<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> source,
|
|
<A HREF="../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A> origTokenList,
|
|
<A HREF="../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A> strippedTokenList,
|
|
<A HREF="../mars/mips/instructions/Instruction.html" title="class in mars.mips.instructions">Instruction</A> inst,
|
|
int textAddress,
|
|
int sourceLine)</PRE>
|
|
<DL>
|
|
<DD>Constructor for ProgramStatement when there are links back to all source and token
|
|
information. These can be used by a debugger later on.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>sourceMIPSprogram</CODE> - The MIPSprogram object that contains this statement<DD><CODE>source</CODE> - The corresponding MIPS source statement.<DD><CODE>origTokenList</CODE> - Complete list of Token objects (includes labels, comments, parentheses, etc)<DD><CODE>strippedTokenList</CODE> - List of Token objects with all but operators and operands removed.<DD><CODE>inst</CODE> - The Instruction object for this statement's operator.<DD><CODE>textAddress</CODE> - The Text Segment address in memory where the binary machine code for this statement
|
|
is stored.</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="ProgramStatement(int, int)"><!-- --></A><H3>
|
|
ProgramStatement</H3>
|
|
<PRE>
|
|
public <B>ProgramStatement</B>(int binaryStatement,
|
|
int textAddress)</PRE>
|
|
<DL>
|
|
<DD>Constructor for ProgramStatement used only for writing a binary machine
|
|
instruction with no source code to refer back to. Originally supported
|
|
only NOP instruction (all zeroes), but extended in release 4.4 to support
|
|
all basic instructions. This was required for the self-modifying code
|
|
feature.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>binaryStatement</CODE> - The 32-bit machine code.<DD><CODE>textAddress</CODE> - The Text Segment address in memory where the binary machine code for this statement
|
|
is stored.</DL>
|
|
</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="buildBasicStatementFromBasicInstruction(mars.ErrorList)"><!-- --></A><H3>
|
|
buildBasicStatementFromBasicInstruction</H3>
|
|
<PRE>
|
|
public void <B>buildBasicStatementFromBasicInstruction</B>(<A HREF="../mars/ErrorList.html" title="class in mars">ErrorList</A> errors)</PRE>
|
|
<DL>
|
|
<DD>Given specification of BasicInstruction for this operator, build the
|
|
corresponding assembly statement in basic assembly format (e.g. substituting
|
|
register numbers for register names, replacing labels by values).
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>errors</CODE> - The list of assembly errors encountered so far. May add to it here.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="buildMachineStatementFromBasicStatement(mars.ErrorList)"><!-- --></A><H3>
|
|
buildMachineStatementFromBasicStatement</H3>
|
|
<PRE>
|
|
public void <B>buildMachineStatementFromBasicStatement</B>(<A HREF="../mars/ErrorList.html" title="class in mars">ErrorList</A> errors)</PRE>
|
|
<DL>
|
|
<DD>Given the current statement in Basic Assembly format (see above), build the
|
|
32-bit binary machine code statement.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>errors</CODE> - The list of assembly errors encountered so far. May add to it here.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="toString()"><!-- --></A><H3>
|
|
toString</H3>
|
|
<PRE>
|
|
public <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE>
|
|
<DL>
|
|
<DD>Crude attempt at building String representation of this complex structure.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>A String representing the ProgramStatement.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setBasicAssemblyStatement(java.lang.String)"><!-- --></A><H3>
|
|
setBasicAssemblyStatement</H3>
|
|
<PRE>
|
|
public void <B>setBasicAssemblyStatement</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> statement)</PRE>
|
|
<DL>
|
|
<DD>Assigns given String to be Basic Assembly statement equivalent to this source line.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>statement</CODE> - A String containing equivalent Basic Assembly statement.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setMachineStatement(java.lang.String)"><!-- --></A><H3>
|
|
setMachineStatement</H3>
|
|
<PRE>
|
|
public void <B>setMachineStatement</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> statement)</PRE>
|
|
<DL>
|
|
<DD>Assigns given String to be binary machine code (32 characters, all of them 0 or 1)
|
|
equivalent to this source line.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>statement</CODE> - A String containing equivalent machine code.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setBinaryStatement(int)"><!-- --></A><H3>
|
|
setBinaryStatement</H3>
|
|
<PRE>
|
|
public void <B>setBinaryStatement</B>(int binaryCode)</PRE>
|
|
<DL>
|
|
<DD>Assigns given int to be binary machine code equivalent to this source line.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>binaryCode</CODE> - An int containing equivalent binary machine code.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setSource(java.lang.String)"><!-- --></A><H3>
|
|
setSource</H3>
|
|
<PRE>
|
|
public void <B>setSource</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> src)</PRE>
|
|
<DL>
|
|
<DD>associates MIPS source statement. Used by assembler when generating basic
|
|
statements during macro expansion of extended statement.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>src</CODE> - a MIPS source statement.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSourceMIPSprogram()"><!-- --></A><H3>
|
|
getSourceMIPSprogram</H3>
|
|
<PRE>
|
|
public <A HREF="../mars/MIPSprogram.html" title="class in mars">MIPSprogram</A> <B>getSourceMIPSprogram</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces MIPSprogram object representing the source file containing this statement.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The MIPSprogram object. May be null...</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSourceFile()"><!-- --></A><H3>
|
|
getSourceFile</H3>
|
|
<PRE>
|
|
public <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getSourceFile</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces String name of the source file containing this statement.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The file name.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSource()"><!-- --></A><H3>
|
|
getSource</H3>
|
|
<PRE>
|
|
public <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getSource</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces MIPS source statement.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The MIPS source statement.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSourceLine()"><!-- --></A><H3>
|
|
getSourceLine</H3>
|
|
<PRE>
|
|
public int <B>getSourceLine</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces line number of MIPS source statement.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The MIPS source statement line number.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getBasicAssemblyStatement()"><!-- --></A><H3>
|
|
getBasicAssemblyStatement</H3>
|
|
<PRE>
|
|
public <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getBasicAssemblyStatement</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces Basic Assembly statement for this MIPS source statement.
|
|
All numeric values are in decimal.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The Basic Assembly statement.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPrintableBasicAssemblyStatement()"><!-- --></A><H3>
|
|
getPrintableBasicAssemblyStatement</H3>
|
|
<PRE>
|
|
public <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getPrintableBasicAssemblyStatement</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces printable Basic Assembly statement for this MIPS source
|
|
statement. This is generated dynamically and any addresses and
|
|
values will be rendered in hex or decimal depending on the current
|
|
setting.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The Basic Assembly statement.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getMachineStatement()"><!-- --></A><H3>
|
|
getMachineStatement</H3>
|
|
<PRE>
|
|
public <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getMachineStatement</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces binary machine statement as 32 character string, all '0' and '1' chars.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The String version of 32-bit binary machine code.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getBinaryStatement()"><!-- --></A><H3>
|
|
getBinaryStatement</H3>
|
|
<PRE>
|
|
public int <B>getBinaryStatement</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces 32-bit binary machine statement as int.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The int version of 32-bit binary machine code.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getOriginalTokenList()"><!-- --></A><H3>
|
|
getOriginalTokenList</H3>
|
|
<PRE>
|
|
public <A HREF="../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A> <B>getOriginalTokenList</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces token list generated from original source statement.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The TokenList of Token objects generated from original source.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getStrippedTokenList()"><!-- --></A><H3>
|
|
getStrippedTokenList</H3>
|
|
<PRE>
|
|
public <A HREF="../mars/assembler/TokenList.html" title="class in mars.assembler">TokenList</A> <B>getStrippedTokenList</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces token list stripped of all but operator and operand tokens.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The TokenList of Token objects generated by stripping original list of all
|
|
except operator and operand tokens.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getInstruction()"><!-- --></A><H3>
|
|
getInstruction</H3>
|
|
<PRE>
|
|
public <A HREF="../mars/mips/instructions/Instruction.html" title="class in mars.mips.instructions">Instruction</A> <B>getInstruction</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces Instruction object corresponding to this statement's operator.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The Instruction that matches the operator used in this statement.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getAddress()"><!-- --></A><H3>
|
|
getAddress</H3>
|
|
<PRE>
|
|
public int <B>getAddress</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces Text Segment address where the binary machine statement is stored.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>address in Text Segment of this binary machine statement.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getOperands()"><!-- --></A><H3>
|
|
getOperands</H3>
|
|
<PRE>
|
|
public int[] <B>getOperands</B>()</PRE>
|
|
<DL>
|
|
<DD>Produces int array of operand values for this statement.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>int array of operand values (if any) required by this statement's operator.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getOperand(int)"><!-- --></A><H3>
|
|
getOperand</H3>
|
|
<PRE>
|
|
public int <B>getOperand</B>(int i)</PRE>
|
|
<DL>
|
|
<DD>Produces operand value from given array position (first operand is position 0).
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>i</CODE> - Operand position in array (first operand is position 0).
|
|
<DT><B>Returns:</B><DD>Operand value at given operand array position. If < 0 or >= numOperands, it returns -1.</DL>
|
|
</DD>
|
|
</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../mars/ProcessingException.html" title="class in mars"><B>PREV CLASS</B></A>
|
|
<A HREF="../mars/Settings.html" title="class in mars"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../index.html?mars/ProgramStatement.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="ProgramStatement.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
|
|
</BODY>
|
|
</HTML>
|