return 0;\r
}\r
\r
+static int OpChk(int op)\r
+{\r
+ int sea=0,dea=0;\r
+ char seat[64]="",deat[64]="";\r
+\r
+ sea=op&0x003f;\r
+ DisaGetEa(seat,sea,0);\r
+\r
+ dea=(op>>9)&7; dea|=8;\r
+ DisaGetEa(deat,dea,2);\r
+\r
+ sprintf(DisaText,"chk %s, %s",seat,deat);\r
+ return 0;\r
+}\r
+\r
// ================ Opcodes 0x41c0+ ================\r
static int DisaLea(int op)\r
{\r
return 0;\r
}\r
\r
+// ================ Opcodes 0x4800+ ================\r
+static int DisaNbcd(int op)\r
+{\r
+ // Nbcd 01001000 00eeeeee (eeeeee=ea)\r
+ int ea=0;\r
+ char eat[64]="";\r
+\r
+ ea=op&0x003f;\r
+ DisaGetEa(eat,ea,0);\r
+\r
+ sprintf(DisaText,"nbcd %s",eat);\r
+ return 0;\r
+}\r
+\r
// ================ Opcodes 0x4840+ ================\r
static int DisaSwap(int op)\r
{\r
return 0;\r
}\r
\r
+static int DisaTas(int op)\r
+{\r
+ // Tas 01001010 11eeeeee (eeeeee=ea)\r
+ int ea=0;\r
+ char eat[64]="";\r
+\r
+ ea=op&0x003f;\r
+ DisaGetEa(eat,ea,0);\r
+\r
+ sprintf(DisaText,"tas %s",eat);\r
+ return 0;\r
+}\r
+\r
// ================ Opcodes 0x4e80+ ================\r
static int DisaJsr(int op)\r
{\r
static int DisaAddx(int op)\r
{\r
// 1t01ddd1 xx000sss addx\r
- int type=0,size=0,dea=0,sea=0;\r
+ int type=0,size=0,dea=0,sea=0,mem;\r
char deat[64]="",seat[64]="";\r
char *opcode[6]={"","subx","","","","addx"};\r
\r
type=(op>>12)&5;\r
dea =(op>> 9)&7;\r
size=(op>> 6)&3; if (size>=3) return 1;\r
- sea = op&0x3f;\r
+ sea = op&7;\r
+ mem = op&8;\r
+ if(mem) { sea+=0x20; dea+=0x20; }\r
\r
DisaGetEa(deat,dea,size);\r
DisaGetEa(seat,sea,size);\r
if ((op&0xff00)==0x0800) DisaBtstImm(op); // Btst/Bchg/Bclr/Bset\r
if ((op&0xc000)==0x0000) DisaMove(op);\r
if ((op&0xf900)==0x4000) DisaNeg(op); // Negx/Clr/Neg/Not\r
+ if ((op&0xf140)==0x4100) OpChk(op);\r
if ((op&0xf1c0)==0x41c0) DisaLea(op);\r
if ((op&0xf9c0)==0x40c0) DisaMoveSr(op);\r
+ if ((op&0xffc0)==0x4800) DisaNbcd(op);\r
if ((op&0xfff8)==0x4840) DisaSwap(op);\r
if ((op&0xffc0)==0x4840) DisaPea(op);\r
if ((op&0xffb8)==0x4880) DisaExt(op);\r
if ((op&0xfb80)==0x4880) DisaMovem(op);\r
if ((op&0xff00)==0x4a00) DisaTst(op);\r
+ if ((op&0xffc0)==0x4ac0) DisaTas(op);\r
if ((op&0xfff0)==0x4e40) DisaTrap(op);\r
if ((op&0xfff8)==0x4e50) DisaLink(op);\r
if ((op&0xfff8)==0x4e58) DisaUnlk(op);\r