forked from techcompliant/DASM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstruction.h
47 lines (30 loc) · 1.48 KB
/
Instruction.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
#ifndef INSTRUCTION_H
#define INSTRUCTION_H
#include <iterator>
#include <algorithm>
#include <regex>
#include "DAsm.h"
namespace DAsm{
class Program;
class Instruction{
public:
Instruction();
Instruction(std::string source, unsigned int line_number = 0, unsigned int recursion_counter = 0);
virtual ~Instruction();
void LoadSource(std::string source, unsigned int recursion_counter = 0);
void Fill(word value, unsigned int amount);
unsigned int GetLength();
word ParseArg(std::string source, bool isA = false);
opcode GetOpcode(std::string str);
opcode GetSpecialOpcode(std::string str);
void Error(std::string nError);
unsigned int mLineNumber;
std::string mSourceLine;
std::list<word> mWords;
static std::list<str_opcode> mOpcodes;
static std::list<str_opcode> mSpecialOpcodes;
static std::list<str_opcode> mReg;
static Program* mProgram;
};
}
#endif