1 #pragma once
2 
3 #include <vector>
4 #include "SymbolTable.h"
5 #include "Commands/CAssemblerCommand.h"
6 #include "Util/EncodingTable.h"
7 #include "Util/FileClasses.h"
8 #include "Core/Misc.h"
9 #include "Core/SymbolData.h"
10 #include "Archs/Architecture.h"
11 
12 typedef struct {
13 	std::vector<std::wstring> FileList;
14 	int FileCount;
15 	int FileNum;
16 	int LineNumber;
17 	int TotalLineCount;
18 } tFileInfo;
19 
20 typedef struct {
21 	tFileInfo FileInfo;
22 	SymbolTable symbolTable;
23 	EncodingTable Table;
24 	int Section;
25 	bool nocash;
26 	bool relativeInclude;
27 	int validationPasses;
28 	bool memoryMode;
29 	std::shared_ptr<AssemblerFile> memoryFile;
30 	bool multiThreading;
31 } tGlobal;
32 
33 extern tGlobal Global;
34 extern CArchitecture* Arch;
35 
36 class FileManager;
37 extern FileManager* g_fileManager;
38 
39 std::wstring getFolderNameFromPath(const std::wstring& src);
40 std::wstring getFullPathName(const std::wstring& path);
41 
42 bool checkLabelDefined(const std::wstring& labelName, int section);
43 bool checkValidLabelName(const std::wstring& labelName);
44 
45 bool isPowerOfTwo(int64_t n);
46