Browse code

Add source code of the assembler compiler

Pawel Jablonski authored on 14/12/2022 19:04:16
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,42 @@
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
+#ifndef RAMITEM_H
13
+#define RAMITEM_H
14
+
15
+#include <QString>
16
+
17
+//! This class contains a one non-initialized read-write data item stored in the ram
18
+class RamItem
19
+{
20
+	public:
21
+		RamItem(int line, const QString &name, const QString &arraySize);
22
+
23
+		int getLine() const;
24
+		const QString &getName() const;
25
+		const QString &getArraySize() const;
26
+
27
+		void setDataSize(unsigned int size);
28
+		unsigned int getDataSize() const;
29
+
30
+		void setAddress(unsigned int address);
31
+		unsigned int getAddress() const;
32
+
33
+	private:
34
+		int line; //!< Line number from the source file
35
+		QString name; //!< Name of the data item
36
+		QString arraySize; //!< Data size in raw text format
37
+
38
+		unsigned int dataSize; //!< Data size
39
+		unsigned int address; //!< Address in memory after linking
40
+};
41
+
42
+#endif