| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,54 @@ |
| 1 |
+/* |
|
| 2 |
+ * Author: Pawel Jablonski |
|
| 3 |
+ * E-mail: pj@xirx.net |
|
| 4 |
+ * WWW: xirx.net |
|
| 5 |
+ * GIT: git.xirx.net |
|
| 6 |
+ * |
|
| 7 |
+ * License: You can use this code however you like |
|
| 8 |
+ * but leave information about the original author. |
|
| 9 |
+ * Code is free for non-commercial and commercial use. |
|
| 10 |
+ */ |
|
| 11 |
+ |
|
| 12 |
+#include "ucode.h" |
|
| 13 |
+ |
|
| 14 |
+/** |
|
| 15 |
+ * Default constructor. |
|
| 16 |
+ * It creates an object filled by zeros |
|
| 17 |
+ */ |
|
| 18 |
+UCode::UCode() |
|
| 19 |
+{
|
|
| 20 |
+ this->code[0] = 0; |
|
| 21 |
+ this->code[1] = 0; |
|
| 22 |
+} |
|
| 23 |
+ |
|
| 24 |
+/** |
|
| 25 |
+ * Constructor using for create a parsed microcode of the single step based on an input data |
|
| 26 |
+ * |
|
| 27 |
+ * @param code0 Low parsed microcode part |
|
| 28 |
+ * @param code1 High parsed microcode part |
|
| 29 |
+ */ |
|
| 30 |
+UCode::UCode(unsigned char code0, unsigned char code1) |
|
| 31 |
+{
|
|
| 32 |
+ this->code[0] = code0; |
|
| 33 |
+ this->code[1] = code1; |
|
| 34 |
+} |
|
| 35 |
+ |
|
| 36 |
+/** |
|
| 37 |
+ * Get a value of the low microcode part |
|
| 38 |
+ * |
|
| 39 |
+ * @return Low microcode part |
|
| 40 |
+ */ |
|
| 41 |
+unsigned char UCode::getCode0() const |
|
| 42 |
+{
|
|
| 43 |
+ return(this->code[0]); |
|
| 44 |
+} |
|
| 45 |
+ |
|
| 46 |
+/** |
|
| 47 |
+ * Get a value of the high microcode part |
|
| 48 |
+ * |
|
| 49 |
+ * @return High microcode part |
|
| 50 |
+ */ |
|
| 51 |
+unsigned char UCode::getCode1() const |
|
| 52 |
+{
|
|
| 53 |
+ return(this->code[1]); |
|
| 54 |
+} |