diff options
Diffstat (limited to 'ue3/doxygen/classCInstruction.html')
| -rw-r--r-- | ue3/doxygen/classCInstruction.html | 575 |
1 files changed, 575 insertions, 0 deletions
diff --git a/ue3/doxygen/classCInstruction.html b/ue3/doxygen/classCInstruction.html new file mode 100644 index 0000000..052da01 --- /dev/null +++ b/ue3/doxygen/classCInstruction.html | |||
| @@ -0,0 +1,575 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> | ||
| 3 | <title>mycpu: CInstruction Class Reference</title> | ||
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> | ||
| 5 | <link href="tabs.css" rel="stylesheet" type="text/css"> | ||
| 6 | </head><body> | ||
| 7 | <!-- Generated by Doxygen 1.5.3 --> | ||
| 8 | <div class="tabs"> | ||
| 9 | <ul> | ||
| 10 | <li><a href="index.html"><span>Main Page</span></a></li> | ||
| 11 | <li><a href="namespaces.html"><span>Namespaces</span></a></li> | ||
| 12 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> | ||
| 13 | <li><a href="files.html"><span>Files</span></a></li> | ||
| 14 | </ul> | ||
| 15 | </div> | ||
| 16 | <div class="tabs"> | ||
| 17 | <ul> | ||
| 18 | <li><a href="annotated.html"><span>Class List</span></a></li> | ||
| 19 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> | ||
| 20 | <li><a href="functions.html"><span>Class Members</span></a></li> | ||
| 21 | </ul> | ||
| 22 | </div> | ||
| 23 | <h1>CInstruction Class Reference</h1><!-- doxytag: class="CInstruction" --><code>#include <<a class="el" href="cinstruction_8h-source.html">cinstruction.h</a>></code> | ||
| 24 | <p> | ||
| 25 | <div class="dynheader"> | ||
| 26 | Inheritance diagram for CInstruction:</div> | ||
| 27 | <div class="dynsection"> | ||
| 28 | |||
| 29 | <p><center><img src="classCInstruction.png" usemap="#CInstruction_map" border="0" alt=""></center> | ||
| 30 | <map name="CInstruction_map"> | ||
| 31 | <area href="classCInstructionAdd.html" alt="CInstructionAdd" shape="rect" coords="128,56,246,80"> | ||
| 32 | <area href="classCInstructionDec.html" alt="CInstructionDec" shape="rect" coords="128,112,246,136"> | ||
| 33 | <area href="classCInstructionDiv.html" alt="CInstructionDiv" shape="rect" coords="128,168,246,192"> | ||
| 34 | <area href="classCInstructionInc.html" alt="CInstructionInc" shape="rect" coords="128,224,246,248"> | ||
| 35 | <area href="classCInstructionJumpA.html" alt="CInstructionJumpA" shape="rect" coords="128,280,246,304"> | ||
| 36 | <area href="classCInstructionJumpS.html" alt="CInstructionJumpS" shape="rect" coords="128,336,246,360"> | ||
| 37 | <area href="classCInstructionJumpZ.html" alt="CInstructionJumpZ" shape="rect" coords="128,392,246,416"> | ||
| 38 | <area href="classCInstructionLabel.html" alt="CInstructionLabel" shape="rect" coords="128,448,246,472"> | ||
| 39 | <area href="classCInstructionLoad.html" alt="CInstructionLoad" shape="rect" coords="128,504,246,528"> | ||
| 40 | <area href="classCInstructionMul.html" alt="CInstructionMul" shape="rect" coords="128,560,246,584"> | ||
| 41 | <area href="classCInstructionStore.html" alt="CInstructionStore" shape="rect" coords="128,616,246,640"> | ||
| 42 | <area href="classCInstructionSub.html" alt="CInstructionSub" shape="rect" coords="128,672,246,696"> | ||
| 43 | <area href="classCInstructionTest.html" alt="CInstructionTest" shape="rect" coords="128,728,246,752"> | ||
| 44 | <area href="classCInstructionWrite.html" alt="CInstructionWrite" shape="rect" coords="128,784,246,808"> | ||
| 45 | </map> | ||
| 46 | </div> | ||
| 47 | |||
| 48 | <p> | ||
| 49 | <a href="classCInstruction-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> | ||
| 50 | <tr><td></td></tr> | ||
| 51 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> | ||
| 52 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#263195c9e1f109bf44f7040727dcfa78">CInstruction</a> (std::string name)</td></tr> | ||
| 53 | |||
| 54 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default ctor. <a href="#263195c9e1f109bf44f7040727dcfa78"></a><br></td></tr> | ||
| 55 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#d2ded1d8675749bc39a085a8c50a6612">~CInstruction</a> ()</td></tr> | ||
| 56 | |||
| 57 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default dtor. <a href="#d2ded1d8675749bc39a085a8c50a6612"></a><br></td></tr> | ||
| 58 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#395c9bde315efbc0eefd0bbb1586950a">operator==</a> (std::string &name)</td></tr> | ||
| 59 | |||
| 60 | <tr><td class="mdescLeft"> </td><td class="mdescRight">implementation of operator == <a href="#395c9bde315efbc0eefd0bbb1586950a"></a><br></td></tr> | ||
| 61 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classCInstruction.html">CInstruction</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#b5b2364b0cccc6db2f5c3aaccee8aa43">operator()</a> (<a class="el" href="classCCPU.html">CCPU</a> *cpu)</td></tr> | ||
| 62 | |||
| 63 | <tr><td class="mdescLeft"> </td><td class="mdescRight">implementation of operator (<a class="el" href="classCCPU.html">CCPU</a>) <a href="#b5b2364b0cccc6db2f5c3aaccee8aa43"></a><br></td></tr> | ||
| 64 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <br> | ||
| 65 | std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#e8187580097fd2ced5a8bc6e6e09fe44">getName</a> ()</td></tr> | ||
| 66 | |||
| 67 | <tr><td class="mdescLeft"> </td><td class="mdescRight">returns instruction name <a href="#e8187580097fd2ced5a8bc6e6e09fe44"></a><br></td></tr> | ||
| 68 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual std::ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#040a2394e2161a65f37ef31d16bb6a35">dump</a> (std::ostream &stream)</td></tr> | ||
| 69 | |||
| 70 | <tr><td class="mdescLeft"> </td><td class="mdescRight">dumps information about instruction to outputstream <a href="#040a2394e2161a65f37ef31d16bb6a35"></a><br></td></tr> | ||
| 71 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#2723f8875ff0cc4e48d840db1ae5b4a8">parseRegister</a> (const std::string &str)</td></tr> | ||
| 72 | |||
| 73 | <tr><td class="mdescLeft"> </td><td class="mdescRight">parses register syntax Rx (e.g. "R1") <a href="#2723f8875ff0cc4e48d840db1ae5b4a8"></a><br></td></tr> | ||
| 74 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#8e938360a34f1cd3bf799f21e2ce6f6c">checkRegister</a> (<a class="el" href="classCCPU.html">CCPU</a> *cpu, const unsigned regidx)</td></tr> | ||
| 75 | |||
| 76 | <tr><td class="mdescLeft"> </td><td class="mdescRight">performs a register boundary check does the register exist in cpu? <a href="#8e938360a34f1cd3bf799f21e2ce6f6c"></a><br></td></tr> | ||
| 77 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classCInstruction.html">CInstruction</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#fae8dc231b375db91f874df0d085b7dc">factory</a> ()=0</td></tr> | ||
| 78 | |||
| 79 | <tr><td class="mdescLeft"> </td><td class="mdescRight">creates a new instance of this instruction <a href="#fae8dc231b375db91f874df0d085b7dc"></a><br></td></tr> | ||
| 80 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#15e2ce88b04fcf208ba43c43f7dd57aa">compile</a> (std::list< std::string > &params)=0</td></tr> | ||
| 81 | |||
| 82 | <tr><td class="mdescLeft"> </td><td class="mdescRight">parses instruction parameters and prepares the instruction for executing <a href="#15e2ce88b04fcf208ba43c43f7dd57aa"></a><br></td></tr> | ||
| 83 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#127fd09a772e9f584550cd342af770d1">execute</a> (<a class="el" href="classCCPU.html">CCPU</a> *cpu)=0</td></tr> | ||
| 84 | |||
| 85 | <tr><td class="mdescLeft"> </td><td class="mdescRight">executes the instruction <a href="#127fd09a772e9f584550cd342af770d1"></a><br></td></tr> | ||
| 86 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> | ||
| 87 | <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#0c3b94ae1323d6201d2afd20c8686194">m_name</a></td></tr> | ||
| 88 | |||
| 89 | <tr><td colspan="2"><br><h2>Friends</h2></td></tr> | ||
| 90 | <tr><td class="memItemLeft" nowrap align="right" valign="top">std::ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstruction.html#7651b4c147411bca34a0393adf03507d">operator<<</a> (std::ostream &stream, <a class="el" href="classCInstruction.html">CInstruction</a> &instr)</td></tr> | ||
| 91 | |||
| 92 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Shift/output operator for outputstream. <a href="#7651b4c147411bca34a0393adf03507d"></a><br></td></tr> | ||
| 93 | </table> | ||
| 94 | <hr><a name="_details"></a><h2>Detailed Description</h2> | ||
| 95 | Abstract class for displays <hr><h2>Constructor & Destructor Documentation</h2> | ||
| 96 | <a class="anchor" name="263195c9e1f109bf44f7040727dcfa78"></a><!-- doxytag: member="CInstruction::CInstruction" ref="263195c9e1f109bf44f7040727dcfa78" args="(std::string name)" --> | ||
| 97 | <div class="memitem"> | ||
| 98 | <div class="memproto"> | ||
| 99 | <table class="memname"> | ||
| 100 | <tr> | ||
| 101 | <td class="memname">CInstruction::CInstruction </td> | ||
| 102 | <td>(</td> | ||
| 103 | <td class="paramtype">std::string </td> | ||
| 104 | <td class="paramname"> <em>name</em> </td> | ||
| 105 | <td> ) </td> | ||
| 106 | <td width="100%"><code> [inline]</code></td> | ||
| 107 | </tr> | ||
| 108 | </table> | ||
| 109 | </div> | ||
| 110 | <div class="memdoc"> | ||
| 111 | |||
| 112 | <p> | ||
| 113 | Default ctor. | ||
| 114 | <p> | ||
| 115 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd><a class="el" href="classCInstruction.html">CInstruction</a> </dd></dl> | ||
| 116 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 117 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 118 | <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>name of instruction </td></tr> | ||
| 119 | </table> | ||
| 120 | </dl> | ||
| 121 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl> | ||
| 122 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 123 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 124 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 125 | <tr><td valign="top"></td><td valign="top"><em>none</em> </td><td></td></tr> | ||
| 126 | </table> | ||
| 127 | </dl> | ||
| 128 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 129 | |||
| 130 | </div> | ||
| 131 | </div><p> | ||
| 132 | <a class="anchor" name="d2ded1d8675749bc39a085a8c50a6612"></a><!-- doxytag: member="CInstruction::~CInstruction" ref="d2ded1d8675749bc39a085a8c50a6612" args="()" --> | ||
| 133 | <div class="memitem"> | ||
| 134 | <div class="memproto"> | ||
| 135 | <table class="memname"> | ||
| 136 | <tr> | ||
| 137 | <td class="memname">virtual CInstruction::~CInstruction </td> | ||
| 138 | <td>(</td> | ||
| 139 | <td class="paramname"> </td> | ||
| 140 | <td> ) </td> | ||
| 141 | <td width="100%"><code> [inline, virtual]</code></td> | ||
| 142 | </tr> | ||
| 143 | </table> | ||
| 144 | </div> | ||
| 145 | <div class="memdoc"> | ||
| 146 | |||
| 147 | <p> | ||
| 148 | Default dtor. | ||
| 149 | <p> | ||
| 150 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>~CInstruction </dd></dl> | ||
| 151 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 152 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 153 | <tr><td valign="top"></td><td valign="top"><em>-</em> </td><td></td></tr> | ||
| 154 | </table> | ||
| 155 | </dl> | ||
| 156 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl> | ||
| 157 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 158 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 159 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 160 | <tr><td valign="top"></td><td valign="top"><em>none</em> </td><td></td></tr> | ||
| 161 | </table> | ||
| 162 | </dl> | ||
| 163 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 164 | |||
| 165 | </div> | ||
| 166 | </div><p> | ||
| 167 | <hr><h2>Member Function Documentation</h2> | ||
| 168 | <a class="anchor" name="395c9bde315efbc0eefd0bbb1586950a"></a><!-- doxytag: member="CInstruction::operator==" ref="395c9bde315efbc0eefd0bbb1586950a" args="(std::string &name)" --> | ||
| 169 | <div class="memitem"> | ||
| 170 | <div class="memproto"> | ||
| 171 | <table class="memname"> | ||
| 172 | <tr> | ||
| 173 | <td class="memname">virtual bool CInstruction::operator== </td> | ||
| 174 | <td>(</td> | ||
| 175 | <td class="paramtype">std::string & </td> | ||
| 176 | <td class="paramname"> <em>name</em> </td> | ||
| 177 | <td> ) </td> | ||
| 178 | <td width="100%"><code> [inline, virtual]</code></td> | ||
| 179 | </tr> | ||
| 180 | </table> | ||
| 181 | </div> | ||
| 182 | <div class="memdoc"> | ||
| 183 | |||
| 184 | <p> | ||
| 185 | implementation of operator == | ||
| 186 | <p> | ||
| 187 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>operator== </dd></dl> | ||
| 188 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 189 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 190 | <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>reference to std::string </td></tr> | ||
| 191 | </table> | ||
| 192 | </dl> | ||
| 193 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>true if instructionname is name </dd></dl> | ||
| 194 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 195 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 196 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 197 | <tr><td valign="top"></td><td valign="top"><em>none</em> </td><td></td></tr> | ||
| 198 | </table> | ||
| 199 | </dl> | ||
| 200 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 201 | |||
| 202 | </div> | ||
| 203 | </div><p> | ||
| 204 | <a class="anchor" name="b5b2364b0cccc6db2f5c3aaccee8aa43"></a><!-- doxytag: member="CInstruction::operator()" ref="b5b2364b0cccc6db2f5c3aaccee8aa43" args="(CCPU *cpu)" --> | ||
| 205 | <div class="memitem"> | ||
| 206 | <div class="memproto"> | ||
| 207 | <table class="memname"> | ||
| 208 | <tr> | ||
| 209 | <td class="memname">virtual <a class="el" href="classCInstruction.html">CInstruction</a>& CInstruction::operator() </td> | ||
| 210 | <td>(</td> | ||
| 211 | <td class="paramtype"><a class="el" href="classCCPU.html">CCPU</a> * </td> | ||
| 212 | <td class="paramname"> <em>cpu</em> </td> | ||
| 213 | <td> ) </td> | ||
| 214 | <td width="100%"><code> [inline, virtual]</code></td> | ||
| 215 | </tr> | ||
| 216 | </table> | ||
| 217 | </div> | ||
| 218 | <div class="memdoc"> | ||
| 219 | |||
| 220 | <p> | ||
| 221 | implementation of operator (<a class="el" href="classCCPU.html">CCPU</a>) | ||
| 222 | <p> | ||
| 223 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>operator() </dd></dl> | ||
| 224 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 225 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 226 | <tr><td valign="top"></td><td valign="top"><em>cpu</em> </td><td>pointer to cpu </td></tr> | ||
| 227 | </table> | ||
| 228 | </dl> | ||
| 229 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl> | ||
| 230 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 231 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 232 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 233 | <tr><td valign="top"></td><td valign="top"><em>std::runtime_error</em> </td><td></td></tr> | ||
| 234 | </table> | ||
| 235 | </dl> | ||
| 236 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 237 | |||
| 238 | </div> | ||
| 239 | </div><p> | ||
| 240 | <a class="anchor" name="e8187580097fd2ced5a8bc6e6e09fe44"></a><!-- doxytag: member="CInstruction::getName" ref="e8187580097fd2ced5a8bc6e6e09fe44" args="()" --> | ||
| 241 | <div class="memitem"> | ||
| 242 | <div class="memproto"> | ||
| 243 | <table class="memname"> | ||
| 244 | <tr> | ||
| 245 | <td class="memname">virtual const std::string& CInstruction::getName </td> | ||
| 246 | <td>(</td> | ||
| 247 | <td class="paramname"> </td> | ||
| 248 | <td> ) </td> | ||
| 249 | <td width="100%"><code> [inline, virtual]</code></td> | ||
| 250 | </tr> | ||
| 251 | </table> | ||
| 252 | </div> | ||
| 253 | <div class="memdoc"> | ||
| 254 | |||
| 255 | <p> | ||
| 256 | returns instruction name | ||
| 257 | <p> | ||
| 258 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>getName </dd></dl> | ||
| 259 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 260 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 261 | <tr><td valign="top"></td><td valign="top"><em>-</em> </td><td></td></tr> | ||
| 262 | </table> | ||
| 263 | </dl> | ||
| 264 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>name of instruction </dd></dl> | ||
| 265 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 266 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 267 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 268 | <tr><td valign="top"></td><td valign="top"><em>none</em> </td><td></td></tr> | ||
| 269 | </table> | ||
| 270 | </dl> | ||
| 271 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 272 | |||
| 273 | </div> | ||
| 274 | </div><p> | ||
| 275 | <a class="anchor" name="040a2394e2161a65f37ef31d16bb6a35"></a><!-- doxytag: member="CInstruction::dump" ref="040a2394e2161a65f37ef31d16bb6a35" args="(std::ostream &stream)" --> | ||
| 276 | <div class="memitem"> | ||
| 277 | <div class="memproto"> | ||
| 278 | <table class="memname"> | ||
| 279 | <tr> | ||
| 280 | <td class="memname">virtual std::ostream& CInstruction::dump </td> | ||
| 281 | <td>(</td> | ||
| 282 | <td class="paramtype">std::ostream & </td> | ||
| 283 | <td class="paramname"> <em>stream</em> </td> | ||
| 284 | <td> ) </td> | ||
| 285 | <td width="100%"><code> [inline, virtual]</code></td> | ||
| 286 | </tr> | ||
| 287 | </table> | ||
| 288 | </div> | ||
| 289 | <div class="memdoc"> | ||
| 290 | |||
| 291 | <p> | ||
| 292 | dumps information about instruction to outputstream | ||
| 293 | <p> | ||
| 294 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>dump </dd></dl> | ||
| 295 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 296 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 297 | <tr><td valign="top"></td><td valign="top"><em>stream</em> </td><td>outputstream </td></tr> | ||
| 298 | </table> | ||
| 299 | </dl> | ||
| 300 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>reference to outputstream </dd></dl> | ||
| 301 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 302 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 303 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 304 | <tr><td valign="top"></td><td valign="top"><em>none</em> </td><td></td></tr> | ||
| 305 | </table> | ||
| 306 | </dl> | ||
| 307 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 308 | |||
| 309 | </div> | ||
| 310 | </div><p> | ||
| 311 | <a class="anchor" name="2723f8875ff0cc4e48d840db1ae5b4a8"></a><!-- doxytag: member="CInstruction::parseRegister" ref="2723f8875ff0cc4e48d840db1ae5b4a8" args="(const std::string &str)" --> | ||
| 312 | <div class="memitem"> | ||
| 313 | <div class="memproto"> | ||
| 314 | <table class="memname"> | ||
| 315 | <tr> | ||
| 316 | <td class="memname">const unsigned CInstruction::parseRegister </td> | ||
| 317 | <td>(</td> | ||
| 318 | <td class="paramtype">const std::string & </td> | ||
| 319 | <td class="paramname"> <em>str</em> </td> | ||
| 320 | <td> ) </td> | ||
| 321 | <td width="100%"><code> [virtual]</code></td> | ||
| 322 | </tr> | ||
| 323 | </table> | ||
| 324 | </div> | ||
| 325 | <div class="memdoc"> | ||
| 326 | |||
| 327 | <p> | ||
| 328 | parses register syntax Rx (e.g. "R1") | ||
| 329 | <p> | ||
| 330 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>parseRegister </dd></dl> | ||
| 331 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 332 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 333 | <tr><td valign="top"></td><td valign="top"><em>str</em> </td><td>register in assembler syntax </td></tr> | ||
| 334 | </table> | ||
| 335 | </dl> | ||
| 336 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>registernumber </dd></dl> | ||
| 337 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 338 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 339 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 340 | <tr><td valign="top"></td><td valign="top"><em>std::runtime_error</em> </td><td></td></tr> | ||
| 341 | </table> | ||
| 342 | </dl> | ||
| 343 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 344 | |||
| 345 | </div> | ||
| 346 | </div><p> | ||
| 347 | <a class="anchor" name="8e938360a34f1cd3bf799f21e2ce6f6c"></a><!-- doxytag: member="CInstruction::checkRegister" ref="8e938360a34f1cd3bf799f21e2ce6f6c" args="(CCPU *cpu, const unsigned regidx)" --> | ||
| 348 | <div class="memitem"> | ||
| 349 | <div class="memproto"> | ||
| 350 | <table class="memname"> | ||
| 351 | <tr> | ||
| 352 | <td class="memname">void CInstruction::checkRegister </td> | ||
| 353 | <td>(</td> | ||
| 354 | <td class="paramtype"><a class="el" href="classCCPU.html">CCPU</a> * </td> | ||
| 355 | <td class="paramname"> <em>cpu</em>, </td> | ||
| 356 | </tr> | ||
| 357 | <tr> | ||
| 358 | <td class="paramkey"></td> | ||
| 359 | <td></td> | ||
| 360 | <td class="paramtype">const unsigned </td> | ||
| 361 | <td class="paramname"> <em>regidx</em></td><td> </td> | ||
| 362 | </tr> | ||
| 363 | <tr> | ||
| 364 | <td></td> | ||
| 365 | <td>)</td> | ||
| 366 | <td></td><td></td><td width="100%"><code> [inline, virtual]</code></td> | ||
| 367 | </tr> | ||
| 368 | </table> | ||
| 369 | </div> | ||
| 370 | <div class="memdoc"> | ||
| 371 | |||
| 372 | <p> | ||
| 373 | performs a register boundary check does the register exist in cpu? | ||
| 374 | <p> | ||
| 375 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>checkRegister </dd></dl> | ||
| 376 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 377 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 378 | <tr><td valign="top"></td><td valign="top"><em>cpu</em> </td><td>pointer to cpu </td></tr> | ||
| 379 | <tr><td valign="top"></td><td valign="top"><em>regidx</em> </td><td>registernumber </td></tr> | ||
| 380 | </table> | ||
| 381 | </dl> | ||
| 382 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl> | ||
| 383 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 384 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 385 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 386 | <tr><td valign="top"></td><td valign="top"><em>std::runtime_error</em> </td><td></td></tr> | ||
| 387 | </table> | ||
| 388 | </dl> | ||
| 389 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 390 | |||
| 391 | </div> | ||
| 392 | </div><p> | ||
| 393 | <a class="anchor" name="fae8dc231b375db91f874df0d085b7dc"></a><!-- doxytag: member="CInstruction::factory" ref="fae8dc231b375db91f874df0d085b7dc" args="()=0" --> | ||
| 394 | <div class="memitem"> | ||
| 395 | <div class="memproto"> | ||
| 396 | <table class="memname"> | ||
| 397 | <tr> | ||
| 398 | <td class="memname">virtual <a class="el" href="classCInstruction.html">CInstruction</a>* CInstruction::factory </td> | ||
| 399 | <td>(</td> | ||
| 400 | <td class="paramname"> </td> | ||
| 401 | <td> ) </td> | ||
| 402 | <td width="100%"><code> [pure virtual]</code></td> | ||
| 403 | </tr> | ||
| 404 | </table> | ||
| 405 | </div> | ||
| 406 | <div class="memdoc"> | ||
| 407 | |||
| 408 | <p> | ||
| 409 | creates a new instance of this instruction | ||
| 410 | <p> | ||
| 411 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>factory </dd></dl> | ||
| 412 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 413 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 414 | <tr><td valign="top"></td><td valign="top"><em>-</em> </td><td></td></tr> | ||
| 415 | </table> | ||
| 416 | </dl> | ||
| 417 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>new instruction instance </dd></dl> | ||
| 418 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 419 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 420 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 421 | <tr><td valign="top"></td><td valign="top"><em>none</em> </td><td></td></tr> | ||
| 422 | </table> | ||
| 423 | </dl> | ||
| 424 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 425 | |||
| 426 | <p>Implemented in <a class="el" href="classCInstructionInc.html#d55c35cbbd5c88fd29a392051e79f5f1">CInstructionInc</a>, <a class="el" href="classCInstructionDec.html#5aa3bcd55f05765e25758f45f4f55059">CInstructionDec</a>, <a class="el" href="classCInstructionAdd.html#6fa9bae98f84f5ae34946641fb03ff32">CInstructionAdd</a>, <a class="el" href="classCInstructionSub.html#71c77a5113f96ac25e79bc4d28072541">CInstructionSub</a>, <a class="el" href="classCInstructionMul.html#1e8f23073a29a0d50fa9d651b986e821">CInstructionMul</a>, <a class="el" href="classCInstructionDiv.html#3445767e66ab734ec88b6084a10c4446">CInstructionDiv</a>, <a class="el" href="classCInstructionLoad.html#35c051515ccd6a12dbb39ab4b2e33ded">CInstructionLoad</a>, <a class="el" href="classCInstructionStore.html#cab0d4c9bf2cc0d6b1b450ef9aeebcc0">CInstructionStore</a>, <a class="el" href="classCInstructionTest.html#9e4e1ac29b5173a70dc1172bbb096671">CInstructionTest</a>, <a class="el" href="classCInstructionLabel.html#66ba5bd6facecd45f3616fc94eb2845f">CInstructionLabel</a>, <a class="el" href="classCInstructionJumpA.html#d7679ea0d70ab9725f84dcce76adc057">CInstructionJumpA</a>, <a class="el" href="classCInstructionJumpZ.html#e0750f1ce4a5746be3317024f4ef92eb">CInstructionJumpZ</a>, <a class="el" href="classCInstructionJumpS.html#4b25703a62dafb568700dcad217f7ba6">CInstructionJumpS</a>, and <a class="el" href="classCInstructionWrite.html#a33ddc8fb13dfaa253704eb0952f3cea">CInstructionWrite</a>.</p> | ||
| 427 | |||
| 428 | </div> | ||
| 429 | </div><p> | ||
| 430 | <a class="anchor" name="15e2ce88b04fcf208ba43c43f7dd57aa"></a><!-- doxytag: member="CInstruction::compile" ref="15e2ce88b04fcf208ba43c43f7dd57aa" args="(std::list< std::string > &params)=0" --> | ||
| 431 | <div class="memitem"> | ||
| 432 | <div class="memproto"> | ||
| 433 | <table class="memname"> | ||
| 434 | <tr> | ||
| 435 | <td class="memname">virtual void CInstruction::compile </td> | ||
| 436 | <td>(</td> | ||
| 437 | <td class="paramtype">std::list< std::string > & </td> | ||
| 438 | <td class="paramname"> <em>params</em> </td> | ||
| 439 | <td> ) </td> | ||
| 440 | <td width="100%"><code> [pure virtual]</code></td> | ||
| 441 | </tr> | ||
| 442 | </table> | ||
| 443 | </div> | ||
| 444 | <div class="memdoc"> | ||
| 445 | |||
| 446 | <p> | ||
| 447 | parses instruction parameters and prepares the instruction for executing | ||
| 448 | <p> | ||
| 449 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>compile </dd></dl> | ||
| 450 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 451 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 452 | <tr><td valign="top"></td><td valign="top"><em>params</em> </td><td>list of parameters of this instruction </td></tr> | ||
| 453 | </table> | ||
| 454 | </dl> | ||
| 455 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl> | ||
| 456 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 457 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 458 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 459 | <tr><td valign="top"></td><td valign="top"><em>std::runtime_error</em> </td><td></td></tr> | ||
| 460 | </table> | ||
| 461 | </dl> | ||
| 462 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 463 | |||
| 464 | <p>Implemented in <a class="el" href="classCInstructionInc.html#ae36e952ec66b1c5cc2fb7e7c80064cc">CInstructionInc</a>, <a class="el" href="classCInstructionDec.html#84347e9b3a373bafc5c1ae79a557f4c3">CInstructionDec</a>, <a class="el" href="classCInstructionAdd.html#1da9f4b4016d27f2866add0b91e3b0fc">CInstructionAdd</a>, <a class="el" href="classCInstructionSub.html#9fe6d8f0f805313c98f8806a4739cbe9">CInstructionSub</a>, <a class="el" href="classCInstructionMul.html#188024d90dd19fcea0687d32e98c67a7">CInstructionMul</a>, <a class="el" href="classCInstructionDiv.html#349324231c5516886d99caf07ecb8c0c">CInstructionDiv</a>, <a class="el" href="classCInstructionLoad.html#4aa70fe481286e0bcc27f7a9ce896d3d">CInstructionLoad</a>, <a class="el" href="classCInstructionStore.html#9848bf36bd3ec75ae481d8ef1f36c6ee">CInstructionStore</a>, <a class="el" href="classCInstructionTest.html#b09f0e02ab71b01af6eda0152d1fc975">CInstructionTest</a>, <a class="el" href="classCInstructionLabel.html#321fd849ae169d900964431b4100321f">CInstructionLabel</a>, <a class="el" href="classCInstructionJumpA.html#f772a57214b192263594d2ff46f03a1e">CInstructionJumpA</a>, <a class="el" href="classCInstructionJumpZ.html#e4c05192b829d2bcc1e838de195ef3d9">CInstructionJumpZ</a>, <a class="el" href="classCInstructionJumpS.html#671d749a6e93f26851879c4ceac09f4c">CInstructionJumpS</a>, and <a class="el" href="classCInstructionWrite.html#23f5bb8e4b8a74f7a8703d593323b991">CInstructionWrite</a>.</p> | ||
| 465 | |||
| 466 | </div> | ||
| 467 | </div><p> | ||
| 468 | <a class="anchor" name="127fd09a772e9f584550cd342af770d1"></a><!-- doxytag: member="CInstruction::execute" ref="127fd09a772e9f584550cd342af770d1" args="(CCPU *cpu)=0" --> | ||
| 469 | <div class="memitem"> | ||
| 470 | <div class="memproto"> | ||
| 471 | <table class="memname"> | ||
| 472 | <tr> | ||
| 473 | <td class="memname">virtual void CInstruction::execute </td> | ||
| 474 | <td>(</td> | ||
| 475 | <td class="paramtype"><a class="el" href="classCCPU.html">CCPU</a> * </td> | ||
| 476 | <td class="paramname"> <em>cpu</em> </td> | ||
| 477 | <td> ) </td> | ||
| 478 | <td width="100%"><code> [pure virtual]</code></td> | ||
| 479 | </tr> | ||
| 480 | </table> | ||
| 481 | </div> | ||
| 482 | <div class="memdoc"> | ||
| 483 | |||
| 484 | <p> | ||
| 485 | executes the instruction | ||
| 486 | <p> | ||
| 487 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>execute </dd></dl> | ||
| 488 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 489 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 490 | <tr><td valign="top"></td><td valign="top"><em>cpu</em> </td><td>pointer to cpu </td></tr> | ||
| 491 | </table> | ||
| 492 | </dl> | ||
| 493 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl> | ||
| 494 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 495 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 496 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 497 | <tr><td valign="top"></td><td valign="top"><em>std::runtime_error</em> </td><td></td></tr> | ||
| 498 | </table> | ||
| 499 | </dl> | ||
| 500 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 501 | |||
| 502 | <p>Implemented in <a class="el" href="classCInstructionInc.html#2830b4c1aa89410e309821119ecf4d6f">CInstructionInc</a>, <a class="el" href="classCInstructionDec.html#b0a51da3b41aaa4e3e51baaa4151ebca">CInstructionDec</a>, <a class="el" href="classCInstructionAdd.html#3c6844fd425de436ba3e7fbc98fd69e8">CInstructionAdd</a>, <a class="el" href="classCInstructionSub.html#03e098595198d4cc2f45d906e45e7f28">CInstructionSub</a>, <a class="el" href="classCInstructionMul.html#0675f51cbfb5d0d76e605f64b0b2555c">CInstructionMul</a>, <a class="el" href="classCInstructionDiv.html#7fee4e02bc6904c9d6039aa467aed1f4">CInstructionDiv</a>, <a class="el" href="classCInstructionLoad.html#fdda1d554401f9bfd32a6300f5ad2bb6">CInstructionLoad</a>, <a class="el" href="classCInstructionStore.html#fd5ee6692540613ee8cc9a2bf8ff920a">CInstructionStore</a>, <a class="el" href="classCInstructionTest.html#955cf58c41c9e305059baea28b65cf3a">CInstructionTest</a>, <a class="el" href="classCInstructionLabel.html#665f2fc395ffed3bd968659f67868f53">CInstructionLabel</a>, <a class="el" href="classCInstructionJumpA.html#76daeedb9c7cb3be0173580be9390887">CInstructionJumpA</a>, <a class="el" href="classCInstructionJumpZ.html#92f15deda156ebd20e8af47589753783">CInstructionJumpZ</a>, <a class="el" href="classCInstructionJumpS.html#8c2e8e077463e64ca64204bb6ed20f71">CInstructionJumpS</a>, and <a class="el" href="classCInstructionWrite.html#1852e50c21b758a4db205a6cd20e208d">CInstructionWrite</a>.</p> | ||
| 503 | |||
| 504 | </div> | ||
| 505 | </div><p> | ||
| 506 | <hr><h2>Friends And Related Function Documentation</h2> | ||
| 507 | <a class="anchor" name="7651b4c147411bca34a0393adf03507d"></a><!-- doxytag: member="CInstruction::operator<<" ref="7651b4c147411bca34a0393adf03507d" args="(std::ostream &stream, CInstruction &instr)" --> | ||
| 508 | <div class="memitem"> | ||
| 509 | <div class="memproto"> | ||
| 510 | <table class="memname"> | ||
| 511 | <tr> | ||
| 512 | <td class="memname">std::ostream& operator<< </td> | ||
| 513 | <td>(</td> | ||
| 514 | <td class="paramtype">std::ostream & </td> | ||
| 515 | <td class="paramname"> <em>stream</em>, </td> | ||
| 516 | </tr> | ||
| 517 | <tr> | ||
| 518 | <td class="paramkey"></td> | ||
| 519 | <td></td> | ||
| 520 | <td class="paramtype"><a class="el" href="classCInstruction.html">CInstruction</a> & </td> | ||
| 521 | <td class="paramname"> <em>instr</em></td><td> </td> | ||
| 522 | </tr> | ||
| 523 | <tr> | ||
| 524 | <td></td> | ||
| 525 | <td>)</td> | ||
| 526 | <td></td><td></td><td width="100%"><code> [friend]</code></td> | ||
| 527 | </tr> | ||
| 528 | </table> | ||
| 529 | </div> | ||
| 530 | <div class="memdoc"> | ||
| 531 | |||
| 532 | <p> | ||
| 533 | Shift/output operator for outputstream. | ||
| 534 | <p> | ||
| 535 | <dl class="user" compact><dt><b>Methodname:</b></dt><dd>operator<< </dd></dl> | ||
| 536 | <dl compact><dt><b>Parameters:</b></dt><dd> | ||
| 537 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 538 | <tr><td valign="top"></td><td valign="top"><em>stream</em> </td><td>reference to outputstream </td></tr> | ||
| 539 | <tr><td valign="top"></td><td valign="top"><em>instr</em> </td><td>object which will be printed to stream </td></tr> | ||
| 540 | </table> | ||
| 541 | </dl> | ||
| 542 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>reference to outputstream </dd></dl> | ||
| 543 | <dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl> | ||
| 544 | <dl compact><dt><b>Exceptions:</b></dt><dd> | ||
| 545 | <table border="0" cellspacing="2" cellpadding="0"> | ||
| 546 | <tr><td valign="top"></td><td valign="top"><em>none</em> </td><td></td></tr> | ||
| 547 | </table> | ||
| 548 | </dl> | ||
| 549 | <dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl> | ||
| 550 | |||
| 551 | </div> | ||
| 552 | </div><p> | ||
| 553 | <hr><h2>Member Data Documentation</h2> | ||
| 554 | <a class="anchor" name="0c3b94ae1323d6201d2afd20c8686194"></a><!-- doxytag: member="CInstruction::m_name" ref="0c3b94ae1323d6201d2afd20c8686194" args="" --> | ||
| 555 | <div class="memitem"> | ||
| 556 | <div class="memproto"> | ||
| 557 | <table class="memname"> | ||
| 558 | <tr> | ||
| 559 | <td class="memname">std::string <a class="el" href="classCInstruction.html#0c3b94ae1323d6201d2afd20c8686194">CInstruction::m_name</a><code> [protected]</code> </td> | ||
| 560 | </tr> | ||
| 561 | </table> | ||
| 562 | </div> | ||
| 563 | <div class="memdoc"> | ||
| 564 | |||
| 565 | <p> | ||
| 566 | name of instruction | ||
| 567 | </div> | ||
| 568 | </div><p> | ||
| 569 | <hr>The documentation for this class was generated from the following files:<ul> | ||
| 570 | <li>mycpu/<a class="el" href="cinstruction_8h-source.html">cinstruction.h</a><li>mycpu/cinstruction.cpp</ul> | ||
| 571 | <hr size="1"><address style="text-align: right;"><small>Generated on Thu May 14 18:19:17 2009 for mycpu by | ||
| 572 | <a href="http://www.doxygen.org/index.html"> | ||
| 573 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> | ||
| 574 | </body> | ||
| 575 | </html> | ||
