[ucsim] Update email and file info, fix stm8 flash controller
[sdcc.git] / sdcc / sim / ucsim / src / sims / i8085.src / decode.h
blobacb5db5e102ed3aed1690e6193a1e7e1e70e3f4c
1 /*
2 * Simulator of microcontrollers (decode.h)
4 * Copyright (C) 2022 Drotos Daniel
5 *
6 * To contact author send email to dr.dkdb@gmail.com
8 */
10 /* This file is part of microcontroller simulator: ucsim.
12 UCSIM is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 UCSIM is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with UCSIM; see the file COPYING. If not, write to the Free
24 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
25 02111-1307, USA. */
26 /*@1@*/
28 #ifndef DECODE_HEADER
29 #define DECODE_HEADER
31 #include "dcmovrr.h"
33 #define NOP instruction_00
34 #define HLT instruction_76
35 #define EI instruction_fb
36 #define DI instruction_f3
38 #define MVI_Ai8 instruction_3e
39 #define MVI_Bi8 instruction_06
40 #define MVI_Ci8 instruction_0e
41 #define MVI_Di8 instruction_16
42 #define MVI_Ei8 instruction_1e
43 #define MVI_Hi8 instruction_26
44 #define MVI_Li8 instruction_2e
45 #define MVI_Mi8 instruction_36
47 #define LXI_Bi16 instruction_01
48 #define LXI_Di16 instruction_11
49 #define LXI_Hi16 instruction_21
50 #define LXI_Si16 instruction_31
52 #define LDA_a16 instruction_3a
53 #define STA_a16 instruction_32
54 #define LHLD_a16 instruction_2a
55 #define SHLD_a16 instruction_22
56 #define LDAX_B instruction_0a
57 #define LDAX_D instruction_1a
58 #define STAX_B instruction_02
59 #define STAX_D instruction_12
60 #define XCHG instruction_eb
62 #define IN_INST instruction_db
63 #define OUT_INST instruction_d3
65 #define PUSH_B instruction_c5
66 #define PUSH_D instruction_d5
67 #define PUSH_H instruction_e5
68 #define PUSH_PSW instruction_f5
69 #define POP_B instruction_c1
70 #define POP_D instruction_d1
71 #define POP_H instruction_e1
72 #define POP_PSW instruction_f1
73 #define XTHL instruction_e3
74 #define SPHL instruction_f9
76 #define ADD_A instruction_87
77 #define ADD_B instruction_80
78 #define ADD_C instruction_81
79 #define ADD_D instruction_82
80 #define ADD_E instruction_83
81 #define ADD_H instruction_84
82 #define ADD_L instruction_85
83 #define ADD_M instruction_86
84 #define ADI instruction_c6
86 #define ADC_A instruction_8f
87 #define ADC_B instruction_88
88 #define ADC_C instruction_89
89 #define ADC_D instruction_8a
90 #define ADC_E instruction_8b
91 #define ADC_H instruction_8c
92 #define ADC_L instruction_8d
93 #define ADC_M instruction_8e
94 #define ACI instruction_ce
96 #define SUB_A instruction_97
97 #define SUB_B instruction_90
98 #define SUB_C instruction_91
99 #define SUB_D instruction_92
100 #define SUB_E instruction_93
101 #define SUB_H instruction_94
102 #define SUB_L instruction_95
103 #define SUB_M instruction_96
104 #define SUI instruction_d6
106 #define SBB_A instruction_9f
107 #define SBB_B instruction_98
108 #define SBB_C instruction_99
109 #define SBB_D instruction_9a
110 #define SBB_E instruction_9b
111 #define SBB_H instruction_9c
112 #define SBB_L instruction_9d
113 #define SBB_M instruction_9e
114 #define SBI instruction_de
116 #define CMP_A instruction_bf
117 #define CMP_B instruction_b8
118 #define CMP_C instruction_b9
119 #define CMP_D instruction_ba
120 #define CMP_E instruction_bb
121 #define CMP_H instruction_bc
122 #define CMP_L instruction_bd
123 #define CMP_M instruction_be
124 #define CPI instruction_fe
126 #define DAD_B instruction_09
127 #define DAD_D instruction_19
128 #define DAD_H instruction_29
129 #define DAD_S instruction_39
131 #define INR_A instruction_3c
132 #define INR_B instruction_04
133 #define INR_C instruction_0c
134 #define INR_D instruction_14
135 #define INR_E instruction_1c
136 #define INR_H instruction_24
137 #define INR_L instruction_2c
138 #define INR_M instruction_34
140 #define DCR_A instruction_3d
141 #define DCR_B instruction_05
142 #define DCR_C instruction_0d
143 #define DCR_D instruction_15
144 #define DCR_E instruction_1d
145 #define DCR_H instruction_25
146 #define DCR_L instruction_2d
147 #define DCR_M instruction_35
149 #define INX_B instruction_03
150 #define INX_D instruction_13
151 #define INX_H instruction_23
152 #define INX_S instruction_33
153 #define DCX_B instruction_0b
154 #define DCX_D instruction_1b
155 #define DCX_H instruction_2b
156 #define DCX_S instruction_3b
158 #define ANA_A instruction_a7
159 #define ANA_B instruction_a0
160 #define ANA_C instruction_a1
161 #define ANA_D instruction_a2
162 #define ANA_E instruction_a3
163 #define ANA_H instruction_a4
164 #define ANA_L instruction_a5
165 #define ANA_M instruction_a6
166 #define ANI instruction_e6
168 #define ORA_A instruction_b7
169 #define ORA_B instruction_b0
170 #define ORA_C instruction_b1
171 #define ORA_D instruction_b2
172 #define ORA_E instruction_b3
173 #define ORA_H instruction_b4
174 #define ORA_L instruction_b5
175 #define ORA_M instruction_b6
176 #define ORI instruction_f6
178 #define XRA_A instruction_af
179 #define XRA_B instruction_a8
180 #define XRA_C instruction_a9
181 #define XRA_D instruction_aa
182 #define XRA_E instruction_ab
183 #define XRA_H instruction_ac
184 #define XRA_L instruction_ad
185 #define XRA_M instruction_ae
186 #define XRI instruction_ee
188 #define RLC instruction_07
189 #define RRC instruction_0f
190 #define RAL instruction_17
191 #define RAR instruction_1f
193 #define DAA instruction_27
194 #define CMA instruction_2f
195 #define CMC instruction_3f
196 #define STC instruction_37
198 #define JMP instruction_c3
199 #define JNZ instruction_c2
200 #define JZ instruction_ca
201 #define JNC instruction_d2
202 #define JC instruction_da
203 #define JPO instruction_e2
204 #define JPE instruction_ea
205 #define JP instruction_f2
206 #define JM instruction_fa
208 #define CALL instruction_cd
209 #define CNZ instruction_c4
210 #define CZ instruction_cc
211 #define CNC instruction_d4
212 #define CC instruction_dc
213 #define CPO instruction_e4
214 #define CPE instruction_ec
215 #define CP instruction_f4
216 #define CM instruction_fc
218 #define RET instruction_c9
219 #define RNZ instruction_c0
220 #define RZ instruction_c8
221 #define RNC instruction_d0
222 #define RC instruction_d8
223 #define RPO instruction_e0
224 #define RPE instruction_e8
225 #define RP instruction_f0
226 #define RM instruction_f8
228 #define RST_0 instruction_c7
229 #define RST_1 instruction_cf
230 #define RST_2 instruction_d7
231 #define RST_3 instruction_df
232 #define RST_4 instruction_e7
233 #define RST_5 instruction_ef
234 #define RST_6 instruction_f7
235 #define RST_7 instruction_ff
237 #define PCHL instruction_e9
239 #endif
241 /* End of i8085.src/decode.h */