*
* Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
*
- * Written by Karl Bongers karl@turbobit.com
- *
* To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
+ * Other contributors include:
+ * Karl Bongers karl@turbobit.com,
+ * Johan Knol johan.knol@iduna.nl
*
*/
BAD_OPCODE=0,
ADD,
ADDC,
-SUB,
-SUBB,
-CMP,
-AND,
-OR,
-XOR,
ADDS,
-NEG,
-SEXT,
-MUL,
-DIV_w,
-DIV_d,
-DIVU_b,
-DIVU_w,
-DIVU_d,
-DA,
+AND,
+ANL,
ASL,
ASR,
-LEA,
-CPL,
-LSR,
-NORM,
-RL,
-RLC,
-RR,
-RRC,
-MOVS,
-MOVC,
-MOVX,
-PUSH,
-PUSHU,
-POP,
-POPU,
-XCH,
-SETB,
-CLR,
-MOV,
-ANL,
-ORL,
-JMP,
-CALL,
-RET,
-RETI,
BCC,
BCS,
BEQ,
BG,
BGE,
BGT,
+BKPT,
BL,
BLE,
BLT,
BOV,
BPL,
BR,
+CALL,
+CJNE,
+CLR,
+CMP,
+CPL,
+DA,
+DIV_w,
+DIV_d,
+DIVU_b,
+DIVU_w,
+DIVU_d,
+DJNZ,
+FCALL,
+FJMP,
JB,
JBC,
+JMP,
JNB,
-CJNE,
-DJNZ,
-JZ,
JNZ,
+JZ,
+LEA,
+LSR,
+MOV,
+MOVC,
+MOVS,
+MOVX,
+MUL_w,
+MULU_b,
+MULU_w,
+NEG,
NOP,
-BKPT,
-TRAP,
+NORM,
+OR,
+ORL,
+POP,
+POPU,
+PUSH,
+PUSHU,
RESET,
-FCALL,
-FJMP,
-IREG,
+RET,
+RETI,
+RL,
+RLC,
+RR,
+RRC,
+SETB,
+SEXT,
+SUB,
+SUBB,
+TRAP,
+XCH,
+XOR,
};
extern char *op_mnemonic_str[];
// odd-ball ones
NO_OPERANDS, // for NOP
- C_BIT,
- C_NOTBIT,
+ CY_BIT,
+ BIT_CY,
+ CY_NOTBIT,
+ DATA4,
REG_DATA4,
+ REG_DATA5,
IREG_DATA4,
IREGINC_DATA4,
IREGOFF8_DATA4,
IREGOFF16_DATA4,
DIRECT_DATA4,
- REG_ALONE,
- IREG_ALONE,
+ REG,
+ IREG,
BIT_ALONE,
- BIT_REL8,
- DIRECT_ALONE,
+ DIRECT,
+ DIRECT_DIRECT,
RLIST,
ADDR24,
+ BIT_REL8,
REG_REL8,
DIRECT_REL8,
+ REG_REGOFF8,
+ REG_REGOFF16,
+
+ REG_USP,
+ USP_REG,
REL8,
- REL16
+ REL16,
+
+ REG_DIRECT_REL8,
+ REG_DATA8_REL8,
+ REG_DATA16_REL8,
+ IREG_DATA8_REL8,
+ IREG_DATA16_REL8,
+
+ A_APLUSDPTR,
+ A_APLUSPC
};
// table of dissassembled instructions
struct xa_dis_entry
{
- uint code, mask;
- char branch;
- uchar length;
- int mnemonic;
- int operands;
+ uint is1byte; /* only grab 1 byte for table lookup(most are 2 bytes) */
+ uint code; /* bits in opcode used to match table entry(with mask) */
+ uint mask; /* mask used on .code to match up a common opcode */
+ char branch; /* used by main app to implement "next" around calls */
+ uchar length; /* total length of opcode, used by dissasembler and main app */
+ int mnemonic; /* type of opcode(ADD, ADDC...) */
+ int operands; /* unique classification of operands: Rd,Rs = REG_REG,... */
};
extern struct dis_entry glob_disass_xa[];
extern struct xa_dis_entry disass_xa[];
+extern struct name_entry sfr_tabXA51[];
+extern struct name_entry bit_tabXA51[];
#endif
/* End of xa.src/glob.h */