-
Notifications
You must be signed in to change notification settings - Fork 0
/
executor.h
53 lines (34 loc) · 796 Bytes
/
executor.h
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
#ifndef H_DK9EXEC
#define H_DK9EXEC
#include <vector>
#include "instruction_ids.h"
#include "inst_obj.h"
#define REG_PTR -20
#define REG_FLG -10
#define REG_ERR -30
struct VarCont {
std::string value;
int type;
size_t memaddr;
};
struct MemoryUnit {
std::string value;
int type;
};
int getRegId(std::string);
template<class T = std::string>
size_t pushToMem(T, int);
template<class T = long double>
T evalData(std::string, int);
int math(const Instruction&);
bool jump(const Instruction&);
int bitwise(const Instruction&);
int memmanip(const Instruction&);
int mov(const Instruction&);
int rcopy(const Instruction&);
int compare(const Instruction&);
int syscll();
int var(const Instruction&);
void saveDebugLog();
int exec(std::vector<Instruction>, bool);
#endif