sc68fordevelopers  2.2.1
desa68.h
Go to the documentation of this file.
1 
11 /*
12  * sc68 - 68000 disassembler
13  * Copyright (C) 2001-2003 Benjamin Gerard <ben@sashipa.com>
14  *
15  * This program is free software; you can redistribute it and/or modify it
16  * under the terms of the GNU General Public License as published by the
17  * Free Software Foundation; either version 2 of the License, or (at your
18  * option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful, but
21  * WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23  * General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License along
26  * with this program; if not, write to the Free Software Foundation, Inc.,
27  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28  *
29  */
30 
31 #ifndef _DESA68_H_
32 #define _DESA68_H_
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #ifndef EMU68DEBUG
39 #define EMU68DEBUG
40 #endif
41 
78 #define DESA68_SYMBOL_FLAG (1<<0)
79 
92 #define DESA68_INST (1<<0)
93 
95 #define DESA68_BRA (1<<1)
96 
98 #define DESA68_BSR (1<<2)
99 
101 #define DESA68_RTS (1<<3)
102 
104 #define DESA68_INT (1<<4)
105 
107 #define DESA68_NOP (1<<5)
108 
127 typedef struct
128 {
129 
137  unsigned char *mem;
138  unsigned int memmsk;
142  unsigned int pc;
143  int flags;
144  char *str;
145  int strmax;
151  unsigned int immsym_min;
156  unsigned int immsym_max;
157 
168  unsigned int ea_src;
170  unsigned int ea_dst;
172  unsigned int status;
181  unsigned int branch;
183  int w;
185  char *s;
186 
196  int reg0;
197  int reg9;
198  int mode3;
199  int mode6;
200  int opsz;
201  int line;
202  int adrmode0;
203  int adrmode6;
204  int szchar;
205  unsigned int ea;
206 
209 } DESA68parm_t;
210 
211 
216 void desa68(DESA68parm_t *d);
217 
222 #ifdef __cplusplus
223 }
224 #endif
225 
226 #endif /* #ifndef _DESA68_H_ */
int opsz
Intermediat opcode decoding.
Definition: desa68.h:200
unsigned int immsym_max
Maximum value to interpret long immediat or absolute long as symbol.
Definition: desa68.h:156
int reg9
Intermediat opcode decoding.
Definition: desa68.h:197
int flags
Disassemble options
Definition: desa68.h:143
unsigned int branch
Branch or interrupt vector address.
Definition: desa68.h:181
unsigned int ea_src
Effective address of source operand (-1:not a memory operand).
Definition: desa68.h:168
int mode3
Intermediat opcode decoding.
Definition: desa68.h:198
unsigned int immsym_min
Minimum value to interpret long immediat or absolute long as symbol.
Definition: desa68.h:151
68K disassemble pass parameters.
Definition: desa68.h:127
int strmax
Destination string buffer size.
Definition: desa68.h:145
int line
Intermediat opcode decoding.
Definition: desa68.h:201
int reg0
Intermediat opcode decoding.
Definition: desa68.h:196
unsigned char * mem
Base of 68K memory.
Definition: desa68.h:137
int adrmode6
Intermediat opcode decoding.
Definition: desa68.h:203
char * str
Destination string.
Definition: desa68.h:144
unsigned int ea
Intermediat opcode decoding.
Definition: desa68.h:205
void desa68(DESA68parm_t *d)
Disassemble a single 68000 instruction.
int szchar
Intermediat opcode decoding.
Definition: desa68.h:204
char * s
Pointer to current destination char.
Definition: desa68.h:185
int adrmode0
Intermediat opcode decoding.
Definition: desa68.h:202
int w
Last decoded word (16 bit sign extended).
Definition: desa68.h:183
int mode6
Intermediat opcode decoding.
Definition: desa68.h:199
unsigned int pc
Address (Offset in mem) of instruction to disassemble; Returns with the address of the next instructi...
Definition: desa68.h:142
unsigned int ea_dst
Effective address of destiantion operand (-1:not a memory operand).
Definition: desa68.h:170
unsigned int status
disassembly instruction flags
Definition: desa68.h:172
unsigned int memmsk
Size of memory - 1 (mask).
Definition: desa68.h:138