Skip to content

Commit 21badc1

Browse files
authored
Added files
1 parent aeaabcd commit 21badc1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2620
-0
lines changed

Instruction.cpp

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#include <string>
2+
#include "Instruction.h"
3+
4+
Instruction::Instruction(const std::string &mnem) :
5+
m_str { "" }
6+
{
7+
m_str = mnem;
8+
}
9+
10+
Instruction::Instruction(const std::string &mnem, const std::string &op) :
11+
m_str { "" }
12+
{
13+
m_str = mnem + " " + op;
14+
}
15+
16+
Instruction::Instruction(const std::string &mnem, const std::string &op1, const std::string &op2) :
17+
m_str { "" }
18+
{
19+
m_str = mnem + " " + op2 + ", " + op1;
20+
}
21+
22+
std::string Instruction::to_str() const
23+
{
24+
return m_str;
25+
}
26+
27+
Instruction::~Instruction()
28+
{
29+
}

Instruction.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#ifdef INSTRUCTION_H
2+
#error Already included
3+
#else
4+
#define INSTRUCTION_H
5+
6+
class Instruction
7+
{
8+
public:
9+
explicit Instruction(const std::string &mnem);
10+
explicit Instruction(const std::string &mnem, const std::string &op);
11+
explicit Instruction(const std::string &mnem, const std::string &op1, const std::string &op2);
12+
13+
Instruction() = delete;
14+
Instruction(const Instruction &instance) = delete;
15+
Instruction(const Instruction &&instance) = delete;
16+
Instruction &operator=(const Instruction &instance) = delete;
17+
Instruction &operator=(const Instruction &&instance) = delete;
18+
19+
std::string to_str() const;
20+
21+
~Instruction();
22+
23+
private:
24+
std::string m_str;
25+
};
26+
27+
#endif

Instruction_AAA.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <string>
2+
#include "Instruction.h"
3+
#include "asmstream.h"
4+
#include "Instruction_AAA.h"
5+
6+
Instruction_AAA::Instruction_AAA(asmstream &s) :
7+
m_asmout(s)
8+
{
9+
}
10+
11+
void Instruction_AAA::operator()()
12+
{
13+
Instruction instr { "aaa" };
14+
m_asmout << instr;
15+
}
16+
17+
Instruction_AAA::~Instruction_AAA()
18+
{
19+
}

Instruction_AAA.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#ifdef INSTRUCTION_AAA_H
2+
#error Already included
3+
#else
4+
#define INSTRUCTION_AAA_H
5+
6+
class Instruction_AAA
7+
{
8+
public:
9+
Instruction_AAA(asmstream &s);
10+
11+
Instruction_AAA() = delete;
12+
Instruction_AAA(const Instruction_AAA &instance) = delete;
13+
Instruction_AAA(const Instruction_AAA &&instance) = delete;
14+
Instruction_AAA &operator=(const Instruction_AAA &instance) = delete;
15+
Instruction_AAA &operator=(const Instruction_AAA &&instance) = delete;
16+
17+
void operator()();
18+
19+
~Instruction_AAA();
20+
21+
private:
22+
asmstream &m_asmout;
23+
};
24+
25+
#endif

Instruction_AAD.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include <string>
2+
#include "imm8.h"
3+
#include "Instruction.h"
4+
#include "asmstream.h"
5+
#include "Instruction_AAD.h"
6+
7+
Instruction_AAD::Instruction_AAD(asmstream &s) :
8+
m_asmout(s)
9+
{
10+
}
11+
12+
void Instruction_AAD::operator()()
13+
{
14+
Instruction instr { "aad" };
15+
m_asmout << instr;
16+
}
17+
18+
void Instruction_AAD::operator()(const imm8 &op1)
19+
{
20+
Instruction instr { "aad", op1.to_str() };
21+
m_asmout << instr;
22+
}
23+
24+
Instruction_AAD::~Instruction_AAD()
25+
{
26+
}

Instruction_AAD.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#ifdef INSTRUCTION_AAD_H
2+
#error Already included
3+
#else
4+
#define INSTRUCTION_AAD_H
5+
6+
class Instruction_AAD
7+
{
8+
public:
9+
Instruction_AAD(asmstream &s);
10+
11+
Instruction_AAD() = delete;
12+
Instruction_AAD(const Instruction_AAD &instance) = delete;
13+
Instruction_AAD(const Instruction_AAD &&instance) = delete;
14+
Instruction_AAD &operator=(const Instruction_AAD &instance) = delete;
15+
Instruction_AAD &operator=(const Instruction_AAD &&instance) = delete;
16+
17+
void operator()();
18+
void operator()(const imm8 &op1);
19+
20+
~Instruction_AAD();
21+
22+
private:
23+
asmstream &m_asmout;
24+
};
25+
26+
#endif

Instruction_AAM.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include <string>
2+
#include "imm8.h"
3+
#include "Instruction.h"
4+
#include "asmstream.h"
5+
#include "Instruction_AAM.h"
6+
7+
Instruction_AAM::Instruction_AAM(asmstream &s) :
8+
m_asmout(s)
9+
{
10+
}
11+
12+
void Instruction_AAM::operator()()
13+
{
14+
Instruction instr { "aam" };
15+
m_asmout << instr;
16+
}
17+
18+
void Instruction_AAM::operator()(const imm8 &op1)
19+
{
20+
Instruction instr { "aam", op1.to_str() };
21+
m_asmout << instr;
22+
}
23+
24+
Instruction_AAM::~Instruction_AAM()
25+
{
26+
}

Instruction_AAM.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#ifdef INSTRUCTION_AAM_H
2+
#error Already included
3+
#else
4+
#define INSTRUCTION_AAM_H
5+
6+
class Instruction_AAM
7+
{
8+
public:
9+
Instruction_AAM(asmstream &s);
10+
11+
Instruction_AAM() = delete;
12+
Instruction_AAM(const Instruction_AAM &instance) = delete;
13+
Instruction_AAM(const Instruction_AAM &&instance) = delete;
14+
Instruction_AAM &operator=(const Instruction_AAM &instance) = delete;
15+
Instruction_AAM &operator=(const Instruction_AAM &&instance) = delete;
16+
17+
void operator()();
18+
void operator()(const imm8 &op1);
19+
20+
~Instruction_AAM();
21+
22+
private:
23+
asmstream &m_asmout;
24+
};
25+
26+
#endif

Instruction_AAS.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <string>
2+
#include "Instruction.h"
3+
#include "asmstream.h"
4+
#include "Instruction_AAS.h"
5+
6+
Instruction_AAS::Instruction_AAS(asmstream &s) :
7+
m_asmout(s)
8+
{
9+
}
10+
11+
void Instruction_AAS::operator()()
12+
{
13+
Instruction instr { "aas" };
14+
m_asmout << instr;
15+
}
16+
17+
Instruction_AAS::~Instruction_AAS()
18+
{
19+
}

Instruction_AAS.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#ifdef INSTRUCTION_AAS_H
2+
#error Already included
3+
#else
4+
#define INSTRUCTION_AAS_H
5+
6+
class Instruction_AAS
7+
{
8+
public:
9+
Instruction_AAS(asmstream &s);
10+
11+
Instruction_AAS() = delete;
12+
Instruction_AAS(const Instruction_AAS &instance) = delete;
13+
Instruction_AAS(const Instruction_AAS &&instance) = delete;
14+
Instruction_AAS &operator=(const Instruction_AAS &instance) = delete;
15+
Instruction_AAS &operator=(const Instruction_AAS &&instance) = delete;
16+
17+
void operator()();
18+
19+
~Instruction_AAS();
20+
21+
private:
22+
asmstream &m_asmout;
23+
};
24+
25+
#endif

0 commit comments

Comments
 (0)