/* struct for optab */ struct optbl { int inmsk; int invalu; int infmt; char *innam; }; #define MAXFMT 28 #define OPENT 4 /* # words per line in optab */ struct optbl optab[] { 0xf1c0, 0xc1c0, 5, "muls", 0xf1c0, 0xc0c0, 5, "mulu", 0xf1f0, 0xc100, 4, "abcd", 0xfff8, 0x4840, 13, "swap", 0xf100, 0xc100, 12, "exg", 0xfff8, 0x54c8, 11, "dbcc", 0xfff8, 0x55c8, 11, "dbcs", 0xfff8, 0x57c8, 11, "dbeq", 0xfff8, 0x51c8, 11, "dbra", 0xfff8, 0x5cc8, 11, "dbge", 0xfff8, 0x5ec8, 11, "dbgt", 0xfff8, 0x52c8, 11, "dbhi", 0xfff8, 0x5fc8, 11, "dble", 0xfff8, 0x53c8, 11, "dbls", 0xfff8, 0x5dc8, 11, "dblt", 0xfff8, 0x5bc8, 11, "dbmi", 0xfff8, 0x56c8, 11, "dbne", 0xfff8, 0x5ac8, 11, "dbpl", 0xfff8, 0x50c8, 11, "dbt", 0xfff8, 0x58c8, 11, "dbvc", 0xfff8, 0x59c8, 11, "dbvs", 0xffc0, 0x54c0, 25, "scc", 0xffc0, 0x55c0, 25, "scs", 0xffc0, 0x57c0, 25, "seq", 0xffc0, 0x51c0, 25, "sf\040", 0xffc0, 0x5cc0, 25, "sge", 0xffc0, 0x5ec0, 25, "sgt", 0xffc0, 0x52c0, 25, "shi", 0xffc0, 0x5fc0, 25, "sle", 0xffc0, 0x53c0, 25, "sls", 0xffc0, 0x5dc0, 25, "slt", 0xffc0, 0x5bc0, 25, "smi", 0xffc0, 0x56c0, 25, "sne", 0xffc0, 0x5ac0, 25, "spl", 0xffc0, 0x50c0, 25, "st\040", 0xffc0, 0x58c0, 25, "svc", 0xffc0, 0x59c0, 25, "svs", 0xf1f0, 0xd100, 4, "addx", 0xf1f0, 0xd140, 4, "addx", 0xf1f0, 0xd180, 4, "addx", 0xf000, 0xd000, 1, "add", 0xff00, 0x0600, 2, "addi", 0xf100, 0x5000, 17, "addq", 0xf000, 0xc000, 1, "and", 0xff00, 0x0200, 2, "andi", 0xf018, 0xe000, 8, "as", 0xfec0, 0xe0c0, 8, "as", 0xff00, 0x6000, 6, "bra", 0xff00, 0x6400, 6, "bcc", 0xff00, 0x6500, 6, "bcs", 0xff00, 0x6700, 6, "beq", 0xff00, 0x6c00, 6, "bge", 0xff00, 0x6e00, 6, "bgt", 0xff00, 0x6200, 6, "bhi", 0xff00, 0x6f00, 6, "ble", 0xff00, 0x6300, 6, "bls", 0xff00, 0x6d00, 6, "blt", 0xff00, 0x6b00, 6, "bmi", 0xff00, 0x6600, 6, "bne", 0xff00, 0x6a00, 6, "bpl", 0xff00, 0x6800, 6, "bvc", 0xff00, 0x6900, 6, "bvs", 0xff00, 0x6100, 6, "bsr", 0xff00, 0x0c00, 2, "cmpi", 0xf1f8, 0x0108, 21, "movep", 0xf1f8, 0x0148, 21, "movep", 0xf1f8, 0x0188, 21, "movep", 0xf1f8, 0x01c8, 21, "movep", 0xf1c0, 0x0140, 7, "bchg", 0xffc0, 0x0840, 7, "bchg", 0xf1c0, 0x0180, 7, "bclr", 0xffc0, 0x0880, 7, "bclr", 0xf0c0, 0x00c0, 7, "bset", 0xffc0, 0x08c0, 7, "bset", 0xf1c0, 0x0100, 7, "btst", /* fix to Belton's code */ 0xffc0, 0x0800, 7, "btst", 0xf1c0, 0x4180, 5, "chk", 0xff00, 0x4200, 24, "clr", 0xf1f8, 0xb108, 10, "cmpm", 0xf1f8, 0xb148, 10, "cmpm", 0xf1f8, 0xb188, 10, "cmpm", 0xf1c0, 0xb0c0, 5, "cmpa", 0xf1c0, 0xb1c0, 5, "cmpa", 0xf100, 0xb100, 23, "eor", 0xf000, 0xb000, 5, "cmp", 0xf1c0, 0x81c0, 5, "divs", 0xf1c0, 0x80c0, 5, "divu", 0xff00, 0x0a00, 2, "eori", 0xfe38, 0x4800, 27, "ext", 0xffc0, 0x4ec0, 9, "jmp", 0xffc0, 0x4e80, 9, "jsr", 0xf1c0, 0x41c0, 15, "lea", 0xfff8, 0x4e50, 19, "link", 0xf018, 0xe008, 8, "ls", 0xfec0, 0xe2c0, 8, "ls", 0xf000, 0x1000, 3, "move", 0xf000, 0x2000, 3, "move", 0xf000, 0x3000, 3, "move", 0xfff0, 0x4e60, 28, "move", //move usp 0xf9c0, 0x40c0, 26, "move", //special moves 0xfb80, 0x4880, 20, "movem", 0xf100, 0x7000, 22, "moveq", 0xffc0, 0x4800, 25, "nbcd", 0xff00, 0x4400, 24, "neg", 0xff00, 0x4000, 24, "negx", 0xffff, 0x4e71, 0, "nop", 0xff00, 0x4600, 24, "not", 0xf000, 0x8000, 1, "or", 0xff00, 0x0000, 2, "ori", 0xffc0, 0x4840, 9, "pea", 0xffff, 0x4e70, 0, "reset", 0xfec0, 0xe6c0, 8, "ro", //rotate memory 0xfec0, 0xe4c0, 8, "rox", 0xf018, 0xe018, 8, "ro", //rotate 0xf018, 0xe010, 8, "rox", 0xffff, 0x4e73, 0, "rte", 0xffff, 0x4e77, 0, "rtr", 0xffff, 0x4e75, 0, "rts", 0xf1f0, 0x8100, 4, "sbcd", 0xffff, 0x4e72, 14, "stop", 0xf1f0, 0x9100, 4, "subx", 0xf1f0, 0x9140, 4, "subx", 0xf1f0, 0x9180, 4, "subx", 0xf000, 0x9000, 1, "sub", 0xff00, 0x0400, 2, "subi", 0xf100, 0x5100, 17, "subq", 0xffc0, 0x4ac0, 25, "tas", 0xfff0, 0x4e40, 18, "trap", 0xffff, 0x4e76, 0, "trapv", 0xff00, 0x4a00, 24, "tst", 0xfff8, 0x4e58, 13, "unlk", 0, 0, 0, "*unknown instruction*" };