f8 carry bit caching fix. Some f8 code generation improvements.
[sdcc.git] / sdcc / sdas / as6808 / m6808.h
blobd901f09b4ae049fcc6bc78a2552f5706dad05f56
1 /* m6808.h */
3 /*
4 * Copyright (C) 1993-2021 Alan R. Baldwin
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * Alan R. Baldwin
21 * 721 Berkeley St.
22 * Kent, Ohio 44240
25 /*)BUILD
26 $(PROGRAM) = AS6808
27 $(INCLUDE) = {
28 ASXXXX.H
29 M6808.H
31 $(FILES) = {
32 M08MCH.C
33 M08ADR.C
34 M08PST.C
35 ASMAIN.C
36 ASDBG.C
37 ASLEX.C
38 ASSYM.C
39 ASSUBR.C
40 ASEXPR.C
41 ASDATA.C
42 ASLIST.C
43 ASOUT.C
45 $(STACK) = 3000
48 struct adsym
50 char a_str[4]; /* addressing string */
51 int a_val; /* addressing mode value */
55 * Addressing types
57 #define S_IMMED 30
58 #define S_DIR 31
59 #define S_EXT 32
60 #define S_IX 33
61 #define S_IXP 34
62 #define S_IX1 35
63 #define S_IX1P 36
64 #define S_IX2 37
65 #define S_IX2P 38
66 #define S_IS 39
67 #define S_SP1 40
68 #define S_SP2 41
69 #define S_A 42
70 #define S_X 43
71 #define S_S 44
72 #define S_XP 45
75 * Instruction types
77 #define S_INH 60
78 #define S_BRA 61
79 #define S_TYP1 62
80 #define S_TYP2 63
81 #define S_TYP3 64
82 #define S_TYP4 65
83 #define S_TYPAI 66
84 #define S_TYPHX 67
85 #define S_CBEQ 68
86 #define S_CQAX 69
87 #define S_DBNZ 70
88 #define S_DZAX 71
89 #define S_MOV 72
91 #define S_INH8 73
92 #define S_INH8S 74
93 #define S_BRA8 75
96 * Special Types
98 #define S_SDP 80
101 * CPU Option
103 #define S_CPU 82
106 * Processor Types (S_CPU)
108 #define X_HC08 0
109 #define X_HCS08 1
110 #define X_6805 2
111 #define X_HC05 3
114 * Extended Addressing Modes
116 #define R_3BIT 0x0100 /* 3-Bit Addressing Mode */
119 /* machine dependent functions */
121 #ifdef OTHERSYSTEM
123 /* m08adr.c */
124 extern struct adsym axs[];
125 extern int addr(struct expr *esp);
126 extern int admode(struct adsym *sp);
127 extern int srch(char *str);
129 /* m08mch.c */
130 extern struct area *zpg;
131 extern VOID machine(struct mne *mp);
132 extern int mchpcr(struct expr *esp);
133 extern VOID minit(void);
135 #else
137 /* m08adr.c */
138 extern struct adsym axs[];
139 extern int addr();
140 extern int admode();
141 extern int srch();
143 /* m08mch.c */
144 extern struct area *zpg;
145 extern VOID machine();
146 extern int mchpcr();
147 extern VOID minit();
149 #endif