1 /****************************************************************************
2  defs.h
3  ****************************************************************************/
4 
5 #ifndef DEFS_H_
6 #define DEFS_H_
7 
8 #include "cleantyp.h"
9 
10 //
11 // misc typedefs:
12 // --------------
13 
14 //
15 //
16 //
17 typedef struct {
18 #ifdef BYTEORD_LSBFIRST
19   UChar bl;
20   UChar bh;
21 #else
22   UChar bh;
23   UChar bl;
24 #endif
25 } BytesOfWord;
26 
27 typedef union {
28   UInt16       w;
29   BytesOfWord  b;
30 } Word;
31 
32 typedef struct {
33 #ifdef BYTEORD_LSBFIRST
34   Word  wl;
35   Word  wh;
36 #else
37   Word  wh;
38   Word  wl;
39 #endif
40 } WordsOfLong;
41 
42 typedef union {
43   UInt32       i;
44   WordsOfLong  w;
45 } LongWord;
46 
47 //
48 // 'mode_struct' and 'operation' hold information about opcodes
49 //   (used in disassembly and execution)
50 //
51 
52 typedef struct mode {
53   Int16 size;
54   void (*func_format)(Char *, long, UChar *, Char *);
55 } mode_struct;
56 
57 
58 typedef struct op {
59    int (*func_exe)(void);
60    Int16  addr_mode;
61    Char * opname;
62 //   short int filler[3];   // force align to power-of-2 (?)
63 } operation;
64 
65 
66 #endif
67