MemHandler(0,2);\r
ot(" add r4,r0,r10 ;@ r4=Memory Base+PC\n");\r
ot("\n");\r
+#if USE_CHECKPC_CALLBACK\r
CheckPc();\r
+#endif\r
}\r
\r
int OpTrap(int op)\r
use=op&~0xf;\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
\r
- OpStart(op);\r
+ OpStart(op,0x10);\r
ot(" and r0,r8,#0xf ;@ Get trap number\n");\r
ot(" orr r0,r0,#0x20\n");\r
ot(" mov r0,r0,asl #2\n");\r
if (reg==7) use=op;\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
\r
- OpStart(op);\r
+ OpStart(op,0x10);\r
\r
if(reg!=7) {\r
ot(";@ Get An\n");\r
use=op&~7;\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
\r
- OpStart(op);\r
+ OpStart(op,0x10);\r
\r
ot(";@ Get An\n");\r
EaCalc(10, 7, 8, 2, 1);\r
OpEnd();\r
return 0;\r
\r
- case 3: // rte\r
- OpStart(op); Cycles=20;\r
- SuperCheck(op);\r
+ case 3: // rte\r
+ OpStart(op,0x10); Cycles=20;\r
+ SuperCheck(op);\r
PopSr(1);\r
ot(" ldr r10,[r7,#0x60] ;@ Get Memory base\n");\r
PopPc();\r
- SuperChange(op);\r
+ SuperChange(op);\r
CheckInterrupt(op);\r
OpEnd();\r
- SuperEnd(op);\r
+ SuperEnd(op);\r
return 0;\r
\r
case 5: // rts\r
- OpStart(op); Cycles=16;\r
+ OpStart(op,0x10); Cycles=16;\r
ot(" ldr r10,[r7,#0x60] ;@ Get Memory base\n");\r
PopPc();\r
OpEnd();\r
return 0;\r
\r
case 6: // trapv\r
- OpStart(op); Cycles=4;\r
+ OpStart(op,0x10); Cycles=4;\r
ot(" tst r9,#0x10000000\n");\r
ot(" subne r5,r5,#%i\n",30);\r
ot(" movne r0,#0x1c ;@ TRAPV exception\n");\r
return 0;\r
\r
case 7: // rtr\r
- OpStart(op); Cycles=20;\r
+ OpStart(op,0x10); Cycles=20;\r
PopSr(0);\r
ot(" ldr r10,[r7,#0x60] ;@ Get Memory base\n");\r
PopPc();\r
use=OpBase(op);\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
\r
- OpStart(op);\r
+ OpStart(op,0x10);\r
\r
ot(" ldr r10,[r7,#0x60] ;@ Get Memory base\n");\r
ot("\n");\r
else use=(op&0xff00)+1; // Use same opcode for all 8-bit branches\r
\r
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
- OpStart(op);\r
+ OpStart(op,size?0x10:0);\r
\r
ot(";@ Get Branch offset:\n");\r
if (size) \r