This repository has been archived by the owner on Dec 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
userdef.h
214 lines (176 loc) · 3.56 KB
/
userdef.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
/* ******************************************************************** *
* *
* This file came from Motorola's FBug program and is in the public *
* domain. *
* *
* ******************************************************************** */
#ifndef USERDEF_H
#define USERDEF_H
#include "targetsys.h"
#include "structs.h"
#if (COPROCESSOR==TRUE || DEVICE==68040)
typedef struct
{
char *reg;
int field;
}COPROCCONTROLREG;
typedef struct
{
char *condition;
}COPROCCONDITIONALS;
#endif /* COPROCESSOR==TRUE */
typedef struct
{
char *instruction;
int extension;
}MONADICDYADIC;
typedef struct
{
char *reg;
int field;
}CONTROLREG;
typedef struct
{
char *size;
}SIZETYPES;
typedef struct
{
char *type;
}TYPES;
typedef struct
{
char *condition;
}CONDITIONALS;
typedef struct
{
int allowableEA;
}EAALLOWED_TYPE;
typedef struct
{
short option;
}ACTUALFIELD_T_F;
typedef struct
{
char *errorentry;
}ERRORTABLE;
typedef struct
{
char EAentry[7];
}EA_TABLE;
typedef struct opst
{
char *name;
short sizestr; /* sizefield[size] */
short source; /* EAtype[source] */
short dest; /* EAtype[source] */
char *opwordstr;
short sizestartbit;
short sizeendbit;
int cpulvl;
int id;
int (*opfunc)(CMD_ITMS *, int, struct opst *);
} OPSTRUCTURE;
typedef struct
{
char *name;
short sizestr; /* sizefield[size] */
short source; /* EAtype[source] */
short dest; /* EAtype[source] */
int id;
}COPROCSTRUCTURE;
typedef struct
{
char field[10];
}EAFIELD;
typedef struct
{
char *string;
}TESTSTRING;
typedef struct
{
int dis16;
int immediatedata;
int mode;
int Aregnum; /* single EA instruction format */
int indexregnum;
int indexregtype;
int indexsize;
int scale;
int displacement8; /* MC68020 brief format extension word */
int BS;
int IS;
int BDsize;
int index_indirect_selection;
int BDdisplacement;
int ODdisplacement; /* MC68020 full format extension word(s)*/
#if (DEVICE==68040 || COPROCESSOR==TRUE)
short s_fp;
short s1_fp;/* 8 bits */
int e_fp;/* 32 bits */
int f1_fp;/* 32 bits */
int f2_fp;/* 32 bits */
short p_fp;/* extra digit on packed string */
#endif
}EASPEC;
/* ********************ADDITIONS****************************** */
/*
structures used throughout the monitor
*/
struct table_element /* command names, their pointers and syntax */
{
char *nptr;
int (*fptr)();
char *syntax;
};
struct syntax_element /* command syntax elements */
{
char *desc;
};
struct port_element /* ports known for pf command */
{
char *name;
int addr;
int size;
};
struct symbelem /* symbols for symbol table */
{
char name[MAXSYMBLEN];
int value;
};
struct regelem /* registers for mpu, fpu, cmmu etc */
{
char *name;
int value;
};
struct instelem /* instructions for assembler/disassembler */
{
char *name;
int op;
short addr;
short alt;
};
struct breakelem /* break table */
{
int count;
int tempcount;
long address;
long inst1,inst2;
};
/* ***************************************************************** */
/*
external declerations
*/
extern char PROMPT[];
extern char MPUREGMSG[];
extern char WHICHREGMSG[];
extern char BRKMSG[];
extern char SYMBMSG[];
extern char BREAKMSG[];
extern char TRACEMSG[];
extern char VINTMSG[];
extern char BERRMSG[];
extern char UNKNOWNMSG[];
extern char HITKEYMSG[];
extern char MMASHELPMSG[];
/* ***************************************************************** */
#endif