403e38d3c333b6b6b5e76e4dd4f70a1e0ad1c9ef
[calu.git] / 3c_disasm / disasm.h
1 #ifndef __DISASM_H__
2 #define __DISASM_H__
3
4 #include <iostream>
5 #include <string>
6 #include <map>
7
8 #include "uint32_from_hex.hpp"
9
10 class Iinstr;
11
12 #include "Iinstr.hpp"
13
14 using namespace std;
15
16 class disasm {
17
18         private:
19                 std::map<short,Iinstr*> instrs;
20         protected:
21                 void decodeCondition(short);
22                 Iinstr* decodeOpcode(short);
23
24         public:
25                 disasm(std::map<short,Iinstr*> map) : instrs(map) {};
26                 Iinstr* decode(std::string);
27                 Iinstr* decodeNum(CDat);
28                 std::string decodeToString(std::string str);
29 };
30
31 #endif