1 #pragma once
2 #include "../Util/FileClasses.h"
3 #include "../Util/Util.h"
4 #include "FileManager.h"
5 
6 #define ARMIPS_VERSION_MAJOR    0
7 #define ARMIPS_VERSION_MINOR    10
8 #define ARMIPS_VERSION_REVISION 0
9 
10 enum class ArmipsMode { FILE, MEMORY };
11 
12 struct LabelDefinition
13 {
14 	std::wstring name;
15 	int value;
16 };
17 
18 struct EquationDefinition
19 {
20 	std::wstring name;
21 	std::wstring value;
22 };
23 
24 struct ArmipsArguments
25 {
26 	// common
27 	ArmipsMode mode;
28 	int symFileVersion;
29 	bool errorOnWarning;
30 	bool silent;
31 	StringList* errorsResult;
32 	std::vector<EquationDefinition> equList;
33 	std::vector<LabelDefinition> labels;
34 
35 	// file mode
36 	std::wstring inputFileName;
37 	std::wstring tempFileName;
38 	std::wstring symFileName;
39 
40 	// memory mode
41 	std::shared_ptr<AssemblerFile> memoryFile;
42 	std::wstring content;
43 
44 	ArmipsArguments()
45 	{
46 		mode = ArmipsMode::FILE;
47 		errorOnWarning = false;
48 		silent = false;
49 		errorsResult = nullptr;
50 	}
51 };
52 
53 bool runArmips(ArmipsArguments& arguments);
54