-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmct.html
More file actions
61 lines (53 loc) · 2 KB
/
mct.html
File metadata and controls
61 lines (53 loc) · 2 KB
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
<html><head>
<META http-equiv="content-type" content="text/html; charset=utf-8">
<title>mct</title>
</head><body>
<h1>mct</h1>
<!-- Generated by Ddoc from mct.d -->
<br><br>
<dl><dt><big><a name="machComm"></a>struct <u>machComm</u>;
</big></dt>
<dd>Single MIPS command <br><br>
</dd>
<dt><big><a name="generateMask"></a>uint <u>generateMask</u>(int <i>startingBit</i>, int <i>endingBit</i>);
</big></dt>
<dd>Generates mask of ones (1-bit) from starting bit till ending<br><br>
</dd>
<dt><big><a name="regTranslator"></a>string <u>regTranslator</u>(int <i>register</i>);
</big></dt>
<dd>Translates <i>register</i> (0..31) into string with <i>register</i> names <br><br>
</dd>
<dt><big><a name="commandVisualisator"></a>string <u>commandVisualisator</u>(machComm <i>command</i>);
</big></dt>
<dd>Generates output string for a given machComm <br><br>
</dd>
<dt><big><a name="commandTranslator"></a>machComm <u>commandTranslator</u>(uint <i>command</i>);
</big></dt>
<dd>Translates 32-bit <i>command</i> word into machComm <br><br>
</dd>
<dt><big><a name="stringToInt"></a>uint <u>stringToInt</u>(string <i>command</i>);
</big></dt>
<dd>Translates string to <i>command</i> word
<br><br>
<b>Params:</b><br>
<table><tr><td>string <i>command</i></td>
<td>input string. If it starts with leading "0x", then in is being read as hexadezimal word, otherwise it will be interpreted
as decimal number</td></tr>
</table><br>
<b>Returns:</b><br>
uint - <i>command</i> word
<br><br>
<b>TODO:</b><br>
add more tests, wrap in try-catch block, because right now this function is the most weak part of the whole utility<br><br>
</dd>
<dt><big><a name="main"></a>int <u>main</u>(string[] <i>arg</i>);
</big></dt>
<dd>A simple translator from machine code into MIPS-assembler commands
It's buggy and ugly, but as starting point it will go
<br><br>
<b>Authors:</b><br>
Anton Bardishev<br><br>
</dd>
</dl>
<hr><small>Page generated by <a href="http://dlang.org/ddoc.html">Ddoc</a>. </small>
</body></html>