Line 17... |
Line 17... |
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
|
#define MEMORY_LEN 100000
|
#define MEMORY_LEN 100000
|
#define STACK_SIZE 10000
|
#define STACK_SIZE 10000
|
#define LABELNAME_LEN 30
|
#define LABELNAME_LEN 50
|
#define INSNAME_LEN 15
|
#define INSNAME_LEN 15
|
#define OPERANDNAME_LEN 50
|
#define OPERANDNAME_LEN 50
|
|
|
/* This is an abstract memory type rather than physical memory type */
|
/* Structure for holding several labels of a particular memory location */
|
|
struct label_entry {
|
|
char *name;
|
|
struct label_entry *next;
|
|
};
|
|
|
|
/* Structure that holds disassembled instruction. */
|
|
struct insn_entry {
|
|
char *insn;
|
|
char *op1;
|
|
char *op2;
|
|
char *op3;
|
|
char *op4;
|
|
};
|
|
|
|
/* This is an abstract memory type rather than physical memory type. It holds
|
|
disassembled instructions. */
|
struct mem_entry {
|
struct mem_entry {
|
unsigned char data;
|
unsigned char data;
|
unsigned char brk;
|
unsigned char brk;
|
char label[LABELNAME_LEN]; /* label name (optional) */
|
struct label_entry *label; /* labels */
|
char insn[INSNAME_LEN];
|
struct insn_entry *insn; /* insn */
|
char op1[OPERANDNAME_LEN];
|
|
char op2[OPERANDNAME_LEN];
|
|
char op3[OPERANDNAME_LEN];
|
|
char op4[OPERANDNAME_LEN];
|
|
};
|
};
|
|
|
enum insn_type { unknown, exception, arith, shift, compare, branch,
|
enum insn_type { unknown, exception, arith, shift, compare, branch,
|
jump, load, store, movimm, move, extend, nop };
|
jump, load, store, movimm, move, extend, nop };
|
|
|