-
Notifications
You must be signed in to change notification settings - Fork 0
/
defs.h
66 lines (53 loc) · 1020 Bytes
/
defs.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
/****************************************************************************
defs.h
****************************************************************************/
#ifndef DEFS_H_
#define DEFS_H_
#include "cleantyp.h"
//
// misc typedefs:
// --------------
//
//
//
typedef struct {
#ifdef BYTEORD_LSBFIRST
UChar bl;
UChar bh;
#else
UChar bh;
UChar bl;
#endif
} BytesOfWord;
typedef union {
UInt16 w;
BytesOfWord b;
} Word;
typedef struct {
#ifdef BYTEORD_LSBFIRST
Word wl;
Word wh;
#else
Word wh;
Word wl;
#endif
} WordsOfLong;
typedef union {
UInt32 i;
WordsOfLong w;
} LongWord;
//
// 'mode_struct' and 'operation' hold information about opcodes
// (used in disassembly and execution)
//
typedef struct mode {
Int16 size;
void (*func_format)(Char *, long, UChar *, Char *);
} mode_struct;
typedef struct op {
int (*func_exe)(void);
Int16 addr_mode;
Char * opname;
// short int filler[3]; // force align to power-of-2 (?)
} operation;
#endif