yes
[fw/sdcc] / src / z80 / z80.h
1 /** @file z80/z80.h
2     Common definitions between the z80 and gbz80 parts.
3 */
4 #include "common.h"
5 #include "ralloc.h"
6 #include "support.h"
7
8 typedef enum
9   {
10     SUB_Z80,
11     SUB_GBZ80
12   }
13 Z80_SUB_PORT;
14
15 typedef struct
16   {
17     Z80_SUB_PORT sub;
18     int calleeSavesBC;
19   }
20 Z80_OPTS;
21
22 extern Z80_OPTS z80_opts;
23
24 #define IS_GB  (z80_opts.sub == SUB_GBZ80)
25 #define IS_Z80 (z80_opts.sub == SUB_Z80)
26
27 enum
28   {
29     ACCUSE_A = 1,
30     ACCUSE_SCRATCH,
31     ACCUSE_IY
32   };