blob: a659978ac4ea1ddb00b7d85b0a2573f688b415ce (
plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>mycpu: CInstructionAdd Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<h1>CInstructionAdd Class Reference</h1><!-- doxytag: class="CInstructionAdd" --><!-- doxytag: inherits="CInstruction" --><code>#include <<a class="el" href="instructions_8h-source.html">instructions.h</a>></code>
<p>
<div class="dynheader">
Inheritance diagram for CInstructionAdd:</div>
<div class="dynsection">
<p><center><img src="classCInstructionAdd.png" usemap="#CInstructionAdd_map" border="0" alt=""></center>
<map name="CInstructionAdd_map">
<area href="classCInstruction.html" alt="CInstruction" shape="rect" coords="0,0,102,24">
</map>
</div>
<p>
<a href="classCInstructionAdd-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classCInstructionAdd.html">CInstructionAdd</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstructionAdd.html#6fa9bae98f84f5ae34946641fb03ff32">factory</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">creates a new instance of this instruction <a href="#6fa9bae98f84f5ae34946641fb03ff32"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstructionAdd.html#1da9f4b4016d27f2866add0b91e3b0fc">compile</a> (std::list< std::string > &params)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">parses instruction parameters and prepares the instruction for executing <a href="#1da9f4b4016d27f2866add0b91e3b0fc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstructionAdd.html#3c6844fd425de436ba3e7fbc98fd69e8">execute</a> (<a class="el" href="classCCPU.html">CCPU</a> *cpu)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">executes the instruction <a href="#3c6844fd425de436ba3e7fbc98fd69e8"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstructionAdd.html#2808878fbfbee48f1c300bdd976446f4">m_regidx1</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstructionAdd.html#98e9005e15d5eb69ce561a91348a3a91">m_regidx2</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="classCInstructionAdd.html#1c5979587fea23262a9bc593b9dc61a3">m_regidx3</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Implementation of assembler command "add" Syntax: add R1, R2, R3 (R1 = R2 + R3) <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="6fa9bae98f84f5ae34946641fb03ff32"></a><!-- doxytag: member="CInstructionAdd::factory" ref="6fa9bae98f84f5ae34946641fb03ff32" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classCInstructionAdd.html">CInstructionAdd</a>* CInstructionAdd::factory </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
creates a new instance of this instruction
<p>
<dl class="user" compact><dt><b>Methodname:</b></dt><dd>factory </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>-</em> </td><td></td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>new instruction instance </dd></dl>
<dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>none</em> </td><td></td></tr>
</table>
</dl>
<dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl>
<p>Implements <a class="el" href="classCInstruction.html#fae8dc231b375db91f874df0d085b7dc">CInstruction</a>.</p>
</div>
</div><p>
<a class="anchor" name="1da9f4b4016d27f2866add0b91e3b0fc"></a><!-- doxytag: member="CInstructionAdd::compile" ref="1da9f4b4016d27f2866add0b91e3b0fc" args="(std::list< std::string > &params)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CInstructionAdd::compile </td>
<td>(</td>
<td class="paramtype">std::list< std::string > & </td>
<td class="paramname"> <em>params</em> </td>
<td> ) </td>
<td width="100%"><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
parses instruction parameters and prepares the instruction for executing
<p>
<dl class="user" compact><dt><b>Methodname:</b></dt><dd>compile </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>params</em> </td><td>list of parameters of this instruction </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl>
<dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>std::runtime_error</em> </td><td></td></tr>
</table>
</dl>
<dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl>
<p>Implements <a class="el" href="classCInstruction.html#15e2ce88b04fcf208ba43c43f7dd57aa">CInstruction</a>.</p>
</div>
</div><p>
<a class="anchor" name="3c6844fd425de436ba3e7fbc98fd69e8"></a><!-- doxytag: member="CInstructionAdd::execute" ref="3c6844fd425de436ba3e7fbc98fd69e8" args="(CCPU *cpu)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CInstructionAdd::execute </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classCCPU.html">CCPU</a> * </td>
<td class="paramname"> <em>cpu</em> </td>
<td> ) </td>
<td width="100%"><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
executes the instruction
<p>
<dl class="user" compact><dt><b>Methodname:</b></dt><dd>execute </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>cpu</em> </td><td>pointer to cpu </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>- </dd></dl>
<dl class="user" compact><dt><b>Global variables used:</b></dt><dd>none </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>std::runtime_error</em> </td><td></td></tr>
</table>
</dl>
<dl class="user" compact><dt><b>Conditions:</b></dt><dd>none </dd></dl>
<p>Implements <a class="el" href="classCInstruction.html#127fd09a772e9f584550cd342af770d1">CInstruction</a>.</p>
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="2808878fbfbee48f1c300bdd976446f4"></a><!-- doxytag: member="CInstructionAdd::m_regidx1" ref="2808878fbfbee48f1c300bdd976446f4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="classCInstructionAdd.html#2808878fbfbee48f1c300bdd976446f4">CInstructionAdd::m_regidx1</a><code> [protected]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
register number
</div>
</div><p>
<a class="anchor" name="98e9005e15d5eb69ce561a91348a3a91"></a><!-- doxytag: member="CInstructionAdd::m_regidx2" ref="98e9005e15d5eb69ce561a91348a3a91" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="classCInstructionAdd.html#98e9005e15d5eb69ce561a91348a3a91">CInstructionAdd::m_regidx2</a><code> [protected]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
register number
</div>
</div><p>
<a class="anchor" name="1c5979587fea23262a9bc593b9dc61a3"></a><!-- doxytag: member="CInstructionAdd::m_regidx3" ref="1c5979587fea23262a9bc593b9dc61a3" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="classCInstructionAdd.html#1c5979587fea23262a9bc593b9dc61a3">CInstructionAdd::m_regidx3</a><code> [protected]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
register number
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li>mycpu/<a class="el" href="instructions_8h-source.html">instructions.h</a><li>mycpu/instructions.cpp</ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu May 14 18:19:17 2009 for mycpu by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>
|