| 1 | \r |
| 2 | #include <stdio.h>\r |
| 3 | #include <stdarg.h>\r |
| 4 | #include <stdlib.h>\r |
| 5 | #include <string.h>\r |
| 6 | \r |
| 7 | // Disa.c\r |
| 8 | #include "../Pico/Disa.h"\r |
| 9 | \r |
| 10 | // Ea.cpp\r |
| 11 | int EaCalc(int a,int mask,int ea,int size);\r |
| 12 | int EaRead(int a,int v,int ea,int size,int top=0);\r |
| 13 | int EaCanRead(int ea,int size);\r |
| 14 | int EaWrite(int a,int v,int ea,int size,int top=0);\r |
| 15 | int EaCanWrite(int ea);\r |
| 16 | \r |
| 17 | // Main.cpp\r |
| 18 | extern int *CyJump; // Jump table\r |
| 19 | extern int ms; // If non-zero, output in Microsoft ARMASM format\r |
| 20 | extern char *Narm[4]; // Normal ARM Extensions for operand sizes 0,1,2\r |
| 21 | extern char *Sarm[4]; // Sign-extend ARM Extensions for operand sizes 0,1,2\r |
| 22 | extern int Cycles; // Current cycles for opcode\r |
| 23 | extern int Amatch; // If one, try to match A68K timing\r |
| 24 | extern int Accu; // Accuracy\r |
| 25 | extern int Debug; // Debug info\r |
| 26 | void ot(char *format, ...);\r |
| 27 | void ltorg();\r |
| 28 | void CheckInterrupt();\r |
| 29 | int MemHandler(int type,int size);\r |
| 30 | \r |
| 31 | // OpAny.cpp\r |
| 32 | int OpGetFlags(int subtract,int xbit);\r |
| 33 | void OpUse(int op,int use);\r |
| 34 | void OpFirst();\r |
| 35 | void OpStart(int op);\r |
| 36 | void OpEnd();\r |
| 37 | int OpBase(int op);\r |
| 38 | void OpAny(int op);\r |
| 39 | \r |
| 40 | //----------------------\r |
| 41 | // OpArith.cpp\r |
| 42 | int OpArith(int op);\r |
| 43 | int OpLea(int op);\r |
| 44 | int OpAddq(int op);\r |
| 45 | int OpArithReg(int op);\r |
| 46 | int OpMul(int op);\r |
| 47 | int OpAbcd(int op);\r |
| 48 | int OpAritha(int op);\r |
| 49 | int OpAddx(int op);\r |
| 50 | int OpCmpEor(int op);\r |
| 51 | \r |
| 52 | // OpBranch.cpp\r |
| 53 | void OpPush32();\r |
| 54 | void OpPushSr(int high);\r |
| 55 | int OpTrap(int op);\r |
| 56 | int OpLink(int op);\r |
| 57 | int OpUnlk(int op);\r |
| 58 | int Op4E70(int op);\r |
| 59 | int OpJsr(int op);\r |
| 60 | int OpBranch(int op);\r |
| 61 | int OpDbra(int op);\r |
| 62 | \r |
| 63 | // OpLogic.cpp\r |
| 64 | int OpBtstReg(int op);\r |
| 65 | int OpBtstImm(int op);\r |
| 66 | int OpNeg(int op);\r |
| 67 | int OpSwap(int op);\r |
| 68 | int OpTst(int op);\r |
| 69 | int OpExt(int op);\r |
| 70 | int OpSet(int op);\r |
| 71 | int OpAsr(int op);\r |
| 72 | int OpAsrEa(int op);\r |
| 73 | \r |
| 74 | // OpMove.cpp\r |
| 75 | int OpMove(int op);\r |
| 76 | int OpLea(int op);\r |
| 77 | void OpFlagsToReg(int high);\r |
| 78 | void OpRegToFlags(int high);\r |
| 79 | int OpMoveSr(int op);\r |
| 80 | int OpArithSr(int op);\r |
| 81 | int OpPea(int op);\r |
| 82 | int OpMovem(int op);\r |
| 83 | int OpMoveq(int op);\r |
| 84 | int OpMoveUsp(int op);\r |
| 85 | int OpExg(int op);\r |