-
Notifications
You must be signed in to change notification settings - Fork 3
/
asm.h
100 lines (78 loc) · 1.64 KB
/
asm.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#ifndef INCLUDE_ASM_H
#define INCLUDE_ASM_H
// asm.h
// Revision 13-jun-2006
#include "pasmotypes.h"
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <deque>
namespace pasmo {
enum DebugType { NoDebug, DebugSecondPass, DebugAll };
enum ObjectType {
ObjectBin,
ObjectDump,
ObjectHex,
ObjectPrl,
ObjectRel,
ObjectCmd,
ObjectCom,
ObjectTap,
ObjectTapBas,
ObjectTzx,
ObjectTzxBas,
ObjectCdt,
ObjectCdtBas,
ObjectPlus3Dos,
ObjectAmsDos,
ObjectMsx
};
class AsmOptions {
public:
AsmOptions ();
ObjectType getObjectType () const;
void setObjectType (ObjectType type);
address getLinkBase () const;
void setLinkBase (address base);
AsmMode asmmode;
bool nocase;
bool autolocal;
bool bracketonly;
private:
ObjectType objecttype;
address linkbase;
public:
string headername;
bool mode86;
bool warn8080;
bool redirecterr;
bool verbose;
bool common_after_abs;
DebugType debugtype;
size_t lines_to_skip;
size_t numerr;
std::vector <string> module;
};
class Asm {
public:
Asm ();
virtual ~Asm ();
static Asm * create (const AsmOptions & options_n);
virtual void addincludedir (const string & dirname)= 0;
virtual void addpredef (const string & predef)= 0;
virtual void setfilelisting (std::ostream & out_n)= 0;
virtual void loadfile (const string & filename)= 0;
virtual void processfile ()= 0;
virtual void link ()= 0;
virtual void emitcode (std::ostream & out)= 0;
virtual void dumppublic (std::ostream & out)= 0;
virtual void dumpsymbol (std::ostream & out)= 0;
protected:
Asm (const Asm & a);
private:
void operator = (const Asm &); // Forbidden
};
} // namespace pasmo
#endif
// End of asm.h