Mercurial > hg-old > index.cgi
comparison lwdisasm/lwdisasm.h @ 408:2a94b2e64621
Started creation of lwdisasm
author | lost@l-w.ca |
---|---|
date | Mon, 02 Aug 2010 13:24:07 -0600 |
parents | |
children | cba03436c720 |
comparison
equal
deleted
inserted
replaced
407:b2e007c28b8f | 408:2a94b2e64621 |
---|---|
1 /* | |
2 lwdisasm.h | |
3 | |
4 Copyright © 2010 William Astle | |
5 | |
6 This file is part of LWTOOLS. | |
7 | |
8 LWTOOLS is free software: you can redistribute it and/or modify it under the | |
9 terms of the GNU General Public License as published by the Free Software | |
10 Foundation, either version 3 of the License, or (at your option) any later | |
11 version. | |
12 | |
13 This program is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
16 more details. | |
17 | |
18 You should have received a copy of the GNU General Public License along with | |
19 this program. If not, see <http://www.gnu.org/licenses/>. | |
20 */ | |
21 | |
22 #ifndef ____lwdisasm_h_seen____ | |
23 #define ____lwdisasm_h_seen____ | |
24 | |
25 #include <stdint.h> | |
26 | |
27 enum | |
28 { | |
29 INPUT_RAW = 0, | |
30 INPUT_DECB, | |
31 INPUT_OBJ, | |
32 INPUT_OS9 | |
33 }; | |
34 | |
35 enum | |
36 { | |
37 TARGET_6809 = 0, | |
38 TARGET_6309 | |
39 }; | |
40 | |
41 enum | |
42 { | |
43 ADDR_DIR = 0, | |
44 ADDR_EXT, | |
45 ADDR_IND, | |
46 ADDR_IMM8, | |
47 ADDR_IMM16, | |
48 ADDR_IMM32, | |
49 ADDR_INH, | |
50 ADDR_RTOR, | |
51 ADDR_PSHPUL, | |
52 ADDR_IMM8DIR, | |
53 ADDR_IMM8IND, | |
54 ADDR_IMM8EXT, | |
55 ADDR_BITBIT, | |
56 ADDR_REL8, | |
57 ADDR_REL16, | |
58 ADDR_PAGE1, | |
59 ADDR_PAGE2, | |
60 ADDR_TFMPP, | |
61 ADDR_TFMMM, | |
62 ADDR_TFMPC, | |
63 ADDR_TFMCP | |
64 }; | |
65 | |
66 typedef struct disasmstate_s | |
67 { | |
68 int input_type; | |
69 int debug_level; | |
70 char *output_file; | |
71 char *input_file; | |
72 int target; | |
73 uint8_t *filedata; // the file data | |
74 long filelen; // length of the file data | |
75 int base; // base address (raw) | |
76 int entry; // entry address | |
77 } disasmstate_t; | |
78 | |
79 | |
80 | |
81 typedef struct instab_s | |
82 { | |
83 char *op; // mneumonic | |
84 int addrmode; // addressing mode | |
85 } instab_t; | |
86 | |
87 extern instab_t page0_6809[]; | |
88 extern instab_t page1_6809[]; | |
89 extern instab_t page2_6809[]; | |
90 | |
91 extern instab_t page0_6309[]; | |
92 extern instab_t page1_6309[]; | |
93 extern instab_t page2_6309[]; | |
94 | |
95 #endif // ____lwdisasm_h_seen____ |