Back to index

cell-binutils  2.17cvs20070401
w65-opc.h
Go to the documentation of this file.
00001 /* Instruction opcode header for WDC 65816 
00002    (generated by the program sim/w65/gencode -a)
00003 
00004 Copyright 2001, 2002 Free Software Foundation, Inc.
00005 
00006 This file is part of the GNU Binutils and/or GDB, the GNU debugger.
00007 
00008 This program is free software; you can redistribute it and/or modify
00009 it under the terms of the GNU General Public License as published by
00010 the Free Software Foundation; either version 2, or (at your option)
00011 any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License along
00019 with this program; if not, write to the Free Software Foundation, Inc.,
00020 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
00021 
00022 */
00023 
00024 #define ADDR_IMMTOA              1  /* #a      */
00025 #define ADDR_IMMCOP              2  /* #c      */
00026 #define ADDR_IMMTOI              3  /* #i      */
00027 #define ADDR_ACC                 4  /* A       */
00028 #define ADDR_PC_REL              5  /* r       */
00029 #define ADDR_PC_REL_LONG         6  /* rl      */
00030 #define ADDR_IMPLIED             7  /* i       */
00031 #define ADDR_STACK               8  /* s       */
00032 #define ADDR_DIR                 9  /* d       */
00033 #define ADDR_DIR_IDX_X           10        /* d,x     */
00034 #define ADDR_DIR_IDX_Y           11        /* d,y     */
00035 #define ADDR_DIR_IND             12        /* (d)     */
00036 #define ADDR_DIR_IDX_IND_X       13        /* (d,x)   */
00037 #define ADDR_DIR_IND_IDX_Y       14        /* (d),y   */
00038 #define ADDR_DIR_IND_LONG        15        /* [d]     */
00039 #define ADDR_DIR_IND_IDX_Y_LONG  16        /* [d],y   */
00040 #define ADDR_ABS                 17        /* a       */
00041 #define ADDR_ABS_IDX_X           18        /* a,x     */
00042 #define ADDR_ABS_IDX_Y           19        /* a,y     */
00043 #define ADDR_ABS_LONG            20        /* al      */
00044 #define ADDR_ABS_IND_LONG        21        /* [a]     */
00045 #define ADDR_ABS_LONG_IDX_X      22        /* al,x    */
00046 #define ADDR_STACK_REL           23        /* d,s     */
00047 #define ADDR_STACK_REL_INDX_IDX  24        /* (d,s),y */
00048 #define ADDR_ABS_IND             25        /* (a)     */
00049 #define ADDR_ABS_IND_IDX         26        /* (a,x)   */
00050 #define ADDR_BLOCK_MOVE          27        /* xyz     */
00051 struct opinfo {
00052        int val;
00053        int code;
00054        char *name;
00055        int amode;
00056 };
00057 const struct opinfo optable[257]={
00058 #define O_adc 1
00059 #define O_and 2
00060 #define O_asl 3
00061 #define O_bcc 4
00062 #define O_bcs 5
00063 #define O_beq 6
00064 #define O_bit 7
00065 #define O_bmi 8
00066 #define O_bne 9
00067 #define O_bpl 10
00068 #define O_bra 11
00069 #define O_brk 12
00070 #define O_brl 13
00071 #define O_bvc 14
00072 #define O_bvs 15
00073 #define O_clc 16
00074 #define O_cld 17
00075 #define O_cli 18
00076 #define O_clv 19
00077 #define O_cmp 20
00078 #define O_cop 21
00079 #define O_cpx 22
00080 #define O_cpy 23
00081 #define O_dec 24
00082 #define O_dex 25
00083 #define O_dey 26
00084 #define O_eor 27
00085 #define O_inc 28
00086 #define O_inx 29
00087 #define O_iny 30
00088 #define O_jmp 31
00089 #define O_jsr 32
00090 #define O_lda 33
00091 #define O_ldx 34
00092 #define O_ldy 35
00093 #define O_lsr 36
00094 #define O_mvn 37
00095 #define O_mvp 38
00096 #define O_nop 39
00097 #define O_ora 40
00098 #define O_pea 41
00099 #define O_pei 42
00100 #define O_per 43
00101 #define O_pha 44
00102 #define O_phb 45
00103 #define O_phd 46
00104 #define O_phk 47
00105 #define O_php 48
00106 #define O_phx 49
00107 #define O_phy 50
00108 #define O_pla 51
00109 #define O_plb 52
00110 #define O_pld 53
00111 #define O_plp 54
00112 #define O_plx 55
00113 #define O_ply 56
00114 #define O_rep 57
00115 #define O_rol 58
00116 #define O_ror 59
00117 #define O_rti 60
00118 #define O_rtl 61
00119 #define O_rts 62
00120 #define O_sbc 63
00121 #define O_sec 64
00122 #define O_sed 65
00123 #define O_sei 66
00124 #define O_sep 67
00125 #define O_sta 68
00126 #define O_stp 69
00127 #define O_stx 70
00128 #define O_sty 71
00129 #define O_stz 72
00130 #define O_tax 73
00131 #define O_tay 74
00132 #define O_tcd 75
00133 #define O_tcs 76
00134 #define O_tdc 77
00135 #define O_trb 78
00136 #define O_tsb 79
00137 #define O_tsc 80
00138 #define O_tsx 81
00139 #define O_txa 82
00140 #define O_txs 83
00141 #define O_txy 84
00142 #define O_tya 85
00143 #define O_tyx 86
00144 #define O_wai 87
00145 #define O_wdm 88
00146 #define O_xba 89
00147 #define O_xce 90
00148 #ifdef DEFINE_TABLE
00149        {0x69, O_adc, "adc", ADDR_IMMTOA},
00150        {0x72, O_adc, "adc", ADDR_DIR_IND},
00151        {0x71, O_adc, "adc", ADDR_DIR_IND_IDX_Y},
00152        {0x73, O_adc, "adc", ADDR_STACK_REL_INDX_IDX},
00153        {0x61, O_adc, "adc", ADDR_DIR_IDX_IND_X},
00154        {0x67, O_adc, "adc", ADDR_DIR_IND_LONG},
00155        {0x77, O_adc, "adc", ADDR_DIR_IND_IDX_Y_LONG},
00156        {0x6D, O_adc, "adc", ADDR_ABS},
00157        {0x7D, O_adc, "adc", ADDR_ABS_IDX_X},
00158        {0x79, O_adc, "adc", ADDR_ABS_IDX_Y},
00159        {0x6F, O_adc, "adc", ADDR_ABS_LONG},
00160        {0x7F, O_adc, "adc", ADDR_ABS_LONG_IDX_X},
00161        {0x65, O_adc, "adc", ADDR_DIR},
00162        {0x63, O_adc, "adc", ADDR_STACK_REL},
00163        {0x75, O_adc, "adc", ADDR_DIR_IDX_X},
00164        {0x29, O_and, "and", ADDR_IMMTOA},
00165        {0x32, O_and, "and", ADDR_DIR_IND},
00166        {0x31, O_and, "and", ADDR_DIR_IND_IDX_Y},
00167        {0x33, O_and, "and", ADDR_STACK_REL_INDX_IDX},
00168        {0x21, O_and, "and", ADDR_DIR_IDX_IND_X},
00169        {0x27, O_and, "and", ADDR_DIR_IND_LONG},
00170        {0x37, O_and, "and", ADDR_DIR_IND_IDX_Y_LONG},
00171        {0x2D, O_and, "and", ADDR_ABS},
00172        {0x3D, O_and, "and", ADDR_ABS_IDX_X},
00173        {0x39, O_and, "and", ADDR_ABS_IDX_Y},
00174        {0x2F, O_and, "and", ADDR_ABS_LONG},
00175        {0x3F, O_and, "and", ADDR_ABS_LONG_IDX_X},
00176        {0x25, O_and, "and", ADDR_DIR},
00177        {0x23, O_and, "and", ADDR_STACK_REL},
00178        {0x35, O_and, "and", ADDR_DIR_IDX_X},
00179        {0x0A, O_asl, "asl", ADDR_ACC},
00180        {0x0E, O_asl, "asl", ADDR_ABS},
00181        {0x1E, O_asl, "asl", ADDR_ABS_IDX_X},
00182        {0x06, O_asl, "asl", ADDR_DIR},
00183        {0x16, O_asl, "asl", ADDR_DIR_IDX_X},
00184        {0x90, O_bcc, "bcc", ADDR_PC_REL},
00185        {0xB0, O_bcs, "bcs", ADDR_PC_REL},
00186        {0xF0, O_beq, "beq", ADDR_PC_REL},
00187        {0x89, O_bit, "bit", ADDR_IMMTOA},
00188        {0x24, O_bit, "bit", ADDR_DIR_IND},
00189        {0x34, O_bit, "bit", ADDR_DIR_IDX_IND_X},
00190        {0x2C, O_bit, "bit", ADDR_ABS},
00191        {0x3C, O_bit, "bit", ADDR_ABS_IDX_X},
00192        {0x30, O_bmi, "bmi", ADDR_PC_REL},
00193        {0xD0, O_bne, "bne", ADDR_PC_REL},
00194        {0x10, O_bpl, "bpl", ADDR_PC_REL},
00195        {0x80, O_bra, "bra", ADDR_PC_REL},
00196        {0x00, O_brk, "brk", ADDR_STACK},
00197        {0x82, O_brl, "brl", ADDR_PC_REL_LONG},
00198        {0x50, O_bvc, "bvc", ADDR_PC_REL},
00199        {0x70, O_bvs, "bvs", ADDR_PC_REL},
00200        {0x18, O_clc, "clc", ADDR_IMPLIED},
00201        {0xD8, O_cld, "cld", ADDR_IMPLIED},
00202        {0x58, O_cli, "cli", ADDR_IMPLIED},
00203        {0xB8, O_clv, "clv", ADDR_IMPLIED},
00204        {0xC9, O_cmp, "cmp", ADDR_IMMTOA},
00205        {0xD2, O_cmp, "cmp", ADDR_DIR_IND},
00206        {0xD1, O_cmp, "cmp", ADDR_DIR_IND_IDX_Y},
00207        {0xD3, O_cmp, "cmp", ADDR_STACK_REL_INDX_IDX},
00208        {0xC1, O_cmp, "cmp", ADDR_DIR_IDX_IND_X},
00209        {0xC7, O_cmp, "cmp", ADDR_DIR_IND_LONG},
00210        {0xD7, O_cmp, "cmp", ADDR_DIR_IND_IDX_Y_LONG},
00211        {0xCD, O_cmp, "cmp", ADDR_ABS},
00212        {0xDD, O_cmp, "cmp", ADDR_ABS_IDX_X},
00213        {0xD9, O_cmp, "cmp", ADDR_ABS_IDX_Y},
00214        {0xCF, O_cmp, "cmp", ADDR_ABS_LONG},
00215        {0xDF, O_cmp, "cmp", ADDR_ABS_LONG_IDX_X},
00216        {0xC5, O_cmp, "cmp", ADDR_DIR},
00217        {0xC3, O_cmp, "cmp", ADDR_STACK_REL},
00218        {0xD5, O_cmp, "cmp", ADDR_DIR_IDX_X},
00219        {0x02, O_cop, "cop", ADDR_IMMCOP},
00220        {0xE0, O_cpx, "cpx", ADDR_IMMTOI},
00221        {0xEC, O_cpx, "cpx", ADDR_ABS},
00222        {0xE4, O_cpx, "cpx", ADDR_DIR},
00223        {0xC0, O_cpy, "cpy", ADDR_IMMTOI},
00224        {0xCC, O_cpy, "cpy", ADDR_ABS},
00225        {0xC4, O_cpy, "cpy", ADDR_DIR},
00226        {0x3A, O_dec, "dec", ADDR_ACC},
00227        {0xCE, O_dec, "dec", ADDR_ABS},
00228        {0xDE, O_dec, "dec", ADDR_ABS_IDX_X},
00229        {0xC6, O_dec, "dec", ADDR_DIR},
00230        {0xD6, O_dec, "dec", ADDR_DIR_IDX_X},
00231        {0xCA, O_dex, "dex", ADDR_IMPLIED},
00232        {0x88, O_dey, "dey", ADDR_IMPLIED},
00233        {0x49, O_eor, "eor", ADDR_IMMTOA},
00234        {0x52, O_eor, "eor", ADDR_DIR_IND},
00235        {0x51, O_eor, "eor", ADDR_DIR_IND_IDX_Y},
00236        {0x53, O_eor, "eor", ADDR_STACK_REL_INDX_IDX},
00237        {0x41, O_eor, "eor", ADDR_DIR_IDX_IND_X},
00238        {0x47, O_eor, "eor", ADDR_DIR_IND_LONG},
00239        {0x57, O_eor, "eor", ADDR_DIR_IND_IDX_Y_LONG},
00240        {0x4D, O_eor, "eor", ADDR_ABS},
00241        {0x5D, O_eor, "eor", ADDR_ABS_IDX_X},
00242        {0x59, O_eor, "eor", ADDR_ABS_IDX_Y},
00243        {0x4F, O_eor, "eor", ADDR_ABS_LONG},
00244        {0x5F, O_eor, "eor", ADDR_ABS_LONG_IDX_X},
00245        {0x45, O_eor, "eor", ADDR_DIR},
00246        {0x43, O_eor, "eor", ADDR_STACK_REL},
00247        {0x55, O_eor, "eor", ADDR_DIR_IDX_X},
00248        {0x1A, O_inc, "inc", ADDR_ACC},
00249        {0xEE, O_inc, "inc", ADDR_ABS},
00250        {0xFE, O_inc, "inc", ADDR_ABS_IDX_X},
00251        {0xE6, O_inc, "inc", ADDR_DIR},
00252        {0xF6, O_inc, "inc", ADDR_DIR_IDX_X},
00253        {0xE8, O_inx, "inx", ADDR_IMPLIED},
00254        {0xC8, O_iny, "iny", ADDR_IMPLIED},
00255        {0x6C, O_jmp, "jmp", ADDR_ABS_IND},
00256        {0x7C, O_jmp, "jmp", ADDR_ABS_IND_IDX},
00257        {0xDC, O_jmp, "jmp", ADDR_ABS_IND_LONG},
00258        {0x4C, O_jmp, "jmp", ADDR_ABS},
00259        {0x5C, O_jmp, "jmp", ADDR_ABS_LONG},
00260        {0xFC, O_jsr, "jsr", ADDR_ABS_IND_IDX},
00261        {0x20, O_jsr, "jsr", ADDR_ABS},
00262        {0x22, O_jsr, "jsr", ADDR_ABS_LONG},
00263        {0xA9, O_lda, "lda", ADDR_IMMTOA},
00264        {0xB2, O_lda, "lda", ADDR_DIR_IND},
00265        {0xB1, O_lda, "lda", ADDR_DIR_IND_IDX_Y},
00266        {0xB3, O_lda, "lda", ADDR_STACK_REL_INDX_IDX},
00267        {0xA1, O_lda, "lda", ADDR_DIR_IDX_IND_X},
00268        {0xA7, O_lda, "lda", ADDR_DIR_IND_LONG},
00269        {0xB7, O_lda, "lda", ADDR_DIR_IND_IDX_Y_LONG},
00270        {0xAD, O_lda, "lda", ADDR_ABS},
00271        {0xBD, O_lda, "lda", ADDR_ABS_IDX_X},
00272        {0xB9, O_lda, "lda", ADDR_ABS_IDX_Y},
00273        {0xAF, O_lda, "lda", ADDR_ABS_LONG},
00274        {0xBF, O_lda, "lda", ADDR_ABS_LONG_IDX_X},
00275        {0xA5, O_lda, "lda", ADDR_DIR},
00276        {0xA3, O_lda, "lda", ADDR_STACK_REL},
00277        {0xB5, O_lda, "lda", ADDR_DIR_IDX_X},
00278        {0xA2, O_ldx, "ldx", ADDR_IMMTOI},
00279        {0xAE, O_ldx, "ldx", ADDR_ABS},
00280        {0xBE, O_ldx, "ldx", ADDR_ABS_IDX_Y},
00281        {0xA6, O_ldx, "ldx", ADDR_DIR},
00282        {0xB6, O_ldx, "ldx", ADDR_DIR_IDX_Y},
00283        {0xA0, O_ldy, "ldy", ADDR_IMMTOI},
00284        {0xAC, O_ldy, "ldy", ADDR_ABS},
00285        {0xBC, O_ldy, "ldy", ADDR_ABS_IDX_X},
00286        {0xA4, O_ldy, "ldy", ADDR_DIR},
00287        {0xB4, O_ldy, "ldy", ADDR_DIR_IDX_X},
00288        {0x4A, O_lsr, "lsr", ADDR_ACC},
00289        {0x4E, O_lsr, "lsr", ADDR_ABS},
00290        {0x5E, O_lsr, "lsr", ADDR_ABS_IDX_X},
00291        {0x46, O_lsr, "lsr", ADDR_DIR},
00292        {0x56, O_lsr, "lsr", ADDR_DIR_IDX_X},
00293        {0x54, O_mvn, "mvn", ADDR_BLOCK_MOVE},
00294        {0x44, O_mvp, "mvp", ADDR_BLOCK_MOVE},
00295        {0xEA, O_nop, "nop", ADDR_IMPLIED},
00296        {0x09, O_ora, "ora", ADDR_IMMTOA},
00297        {0x12, O_ora, "ora", ADDR_DIR_IND},
00298        {0x11, O_ora, "ora", ADDR_DIR_IND_IDX_Y},
00299        {0x13, O_ora, "ora", ADDR_STACK_REL_INDX_IDX},
00300        {0x01, O_ora, "ora", ADDR_DIR_IDX_IND_X},
00301        {0x07, O_ora, "ora", ADDR_DIR_IND_LONG},
00302        {0x17, O_ora, "ora", ADDR_DIR_IND_IDX_Y_LONG},
00303        {0x0D, O_ora, "ora", ADDR_ABS},
00304        {0x1D, O_ora, "ora", ADDR_ABS_IDX_X},
00305        {0x19, O_ora, "ora", ADDR_ABS_IDX_Y},
00306        {0x0F, O_ora, "ora", ADDR_ABS_LONG},
00307        {0x1F, O_ora, "ora", ADDR_ABS_LONG_IDX_X},
00308        {0x05, O_ora, "ora", ADDR_DIR},
00309        {0x03, O_ora, "ora", ADDR_STACK_REL},
00310        {0x15, O_ora, "ora", ADDR_DIR_IDX_X},
00311        {0xF4, O_pea, "pea", ADDR_ABS},
00312        {0xD4, O_pei, "pei", ADDR_DIR},
00313        {0x62, O_per, "per", ADDR_PC_REL_LONG},
00314        {0x48, O_pha, "pha", ADDR_STACK},
00315        {0x8B, O_phb, "phb", ADDR_STACK},
00316        {0x0B, O_phd, "phd", ADDR_STACK},
00317        {0x4B, O_phk, "phk", ADDR_STACK},
00318        {0x08, O_php, "php", ADDR_STACK},
00319        {0xDA, O_phx, "phx", ADDR_STACK},
00320        {0x5A, O_phy, "phy", ADDR_STACK},
00321        {0x68, O_pla, "pla", ADDR_STACK},
00322        {0xAB, O_plb, "plb", ADDR_STACK},
00323        {0x2B, O_pld, "pld", ADDR_STACK},
00324        {0x28, O_plp, "plp", ADDR_STACK},
00325        {0xFA, O_plx, "plx", ADDR_STACK},
00326        {0x7A, O_ply, "ply", ADDR_STACK},
00327        {0xC2, O_rep, "rep", ADDR_IMMCOP},
00328        {0x2A, O_rol, "rol", ADDR_ACC},
00329        {0x2E, O_rol, "rol", ADDR_ABS},
00330        {0x3E, O_rol, "rol", ADDR_ABS_IDX_X},
00331        {0x26, O_rol, "rol", ADDR_DIR},
00332        {0x36, O_rol, "rol", ADDR_DIR_IDX_X},
00333        {0x6A, O_ror, "ror", ADDR_ACC},
00334        {0x6E, O_ror, "ror", ADDR_ABS},
00335        {0x7E, O_ror, "ror", ADDR_ABS_IDX_X},
00336        {0x66, O_ror, "ror", ADDR_DIR},
00337        {0x76, O_ror, "ror", ADDR_DIR_IDX_X},
00338        {0x40, O_rti, "rti", ADDR_STACK},
00339        {0x6B, O_rtl, "rtl", ADDR_STACK},
00340        {0x60, O_rts, "rts", ADDR_STACK},
00341        {0xE9, O_sbc, "sbc", ADDR_IMMTOA},
00342        {0xF2, O_sbc, "sbc", ADDR_DIR_IND},
00343        {0xF1, O_sbc, "sbc", ADDR_DIR_IND_IDX_Y},
00344        {0xF3, O_sbc, "sbc", ADDR_STACK_REL_INDX_IDX},
00345        {0xE1, O_sbc, "sbc", ADDR_DIR_IDX_IND_X},
00346        {0xE7, O_sbc, "sbc", ADDR_DIR_IND_LONG},
00347        {0xF7, O_sbc, "sbc", ADDR_DIR_IND_IDX_Y_LONG},
00348        {0xED, O_sbc, "sbc", ADDR_ABS},
00349        {0xFD, O_sbc, "sbc", ADDR_ABS_IDX_X},
00350        {0xF9, O_sbc, "sbc", ADDR_ABS_IDX_Y},
00351        {0xEF, O_sbc, "sbc", ADDR_ABS_LONG},
00352        {0xFF, O_sbc, "sbc", ADDR_ABS_LONG_IDX_X},
00353        {0xE5, O_sbc, "sbc", ADDR_DIR},
00354        {0xE3, O_sbc, "sbc", ADDR_STACK_REL},
00355        {0xF5, O_sbc, "sbc", ADDR_DIR_IDX_X},
00356        {0x38, O_sec, "sec", ADDR_IMPLIED},
00357        {0xF8, O_sed, "sed", ADDR_IMPLIED},
00358        {0x78, O_sei, "sei", ADDR_IMPLIED},
00359        {0xE2, O_sep, "sep", ADDR_IMMCOP},
00360        {0x92, O_sta, "sta", ADDR_DIR_IND},
00361        {0x91, O_sta, "sta", ADDR_DIR_IND_IDX_Y},
00362        {0x93, O_sta, "sta", ADDR_STACK_REL_INDX_IDX},
00363        {0x81, O_sta, "sta", ADDR_DIR_IDX_IND_X},
00364        {0x87, O_sta, "sta", ADDR_DIR_IND_LONG},
00365        {0x97, O_sta, "sta", ADDR_DIR_IND_IDX_Y_LONG},
00366        {0x8D, O_sta, "sta", ADDR_ABS},
00367        {0x9D, O_sta, "sta", ADDR_ABS_IDX_X},
00368        {0x99, O_sta, "sta", ADDR_ABS_IDX_Y},
00369        {0x8F, O_sta, "sta", ADDR_ABS_LONG},
00370        {0x9F, O_sta, "sta", ADDR_ABS_LONG_IDX_X},
00371        {0x85, O_sta, "sta", ADDR_DIR},
00372        {0x83, O_sta, "sta", ADDR_STACK_REL},
00373        {0x95, O_sta, "sta", ADDR_DIR_IDX_X},
00374        {0xDB, O_stp, "stp", ADDR_IMPLIED},
00375        {0x8E, O_stx, "stx", ADDR_ABS},
00376        {0x86, O_stx, "stx", ADDR_DIR},
00377        {0x96, O_stx, "stx", ADDR_DIR_IDX_X},
00378        {0x8C, O_sty, "sty", ADDR_ABS},
00379        {0x84, O_sty, "sty", ADDR_DIR},
00380        {0x94, O_sty, "sty", ADDR_DIR_IDX_X},
00381        {0x9C, O_stz, "stz", ADDR_ABS},
00382        {0x9E, O_stz, "stz", ADDR_ABS_IDX_X},
00383        {0x64, O_stz, "stz", ADDR_DIR},
00384        {0x74, O_stz, "stz", ADDR_DIR_IDX_X},
00385        {0xAA, O_tax, "tax", ADDR_IMPLIED},
00386        {0xA8, O_tay, "tay", ADDR_IMPLIED},
00387        {0x5B, O_tcd, "tcd", ADDR_IMPLIED},
00388        {0x1B, O_tcs, "tcs", ADDR_IMPLIED},
00389        {0x7B, O_tdc, "tdc", ADDR_IMPLIED},
00390        {0x1C, O_trb, "trb", ADDR_ABS},
00391        {0x14, O_trb, "trb", ADDR_DIR},
00392        {0x0C, O_tsb, "tsb", ADDR_ABS},
00393        {0x04, O_tsb, "tsb", ADDR_DIR},
00394        {0x3B, O_tsc, "tsc", ADDR_IMPLIED},
00395        {0xBA, O_tsx, "tsx", ADDR_IMPLIED},
00396        {0x8A, O_txa, "txa", ADDR_IMPLIED},
00397        {0x9A, O_txs, "txs", ADDR_IMPLIED},
00398        {0x9B, O_txy, "txy", ADDR_IMPLIED},
00399        {0x98, O_tya, "tya", ADDR_IMPLIED},
00400        {0xBB, O_tyx, "tyx", ADDR_IMPLIED},
00401        {0xCB, O_wai, "wai", ADDR_IMPLIED},
00402        {0x42, O_wdm, "wdm", ADDR_IMPLIED},
00403        {0xEB, O_xba, "xba", ADDR_IMPLIED},
00404        {0xFB, O_xce, "xce", ADDR_IMPLIED},
00405        { 0, 0, NULL, 0 }
00406 };
00407 #endif
00408 #define DISASM()\
00409   case ADDR_IMMTOA:\
00410        args[0] = M==0 ? asR_W65_ABS16 : asR_W65_ABS8;\
00411        print_operand (0, "  #$0", args);\
00412        size += M==0 ? 2:1;\
00413        break;\
00414   case ADDR_IMMCOP:\
00415        args[0] = asR_W65_ABS8;\
00416        print_operand (0, "  #$0", args);\
00417        size += 1;\
00418        break;\
00419   case ADDR_IMMTOI:\
00420        args[0] = X==0 ? asR_W65_ABS16 : asR_W65_ABS8;\
00421        print_operand (0, "  #$0", args);\
00422        size += X==0 ? 2:1;\
00423        break;\
00424   case ADDR_ACC:\
00425        print_operand (0, "  a", 0);\
00426        size += 0;\
00427        break;\
00428   case ADDR_PC_REL:\
00429        args[0] = asR_W65_PCR8;\
00430        print_operand (0, "  $0", args);\
00431        size += 1;\
00432        break;\
00433   case ADDR_PC_REL_LONG:\
00434        args[0] = asR_W65_PCR16;\
00435        print_operand (0, "  $0", args);\
00436        size += 2;\
00437        break;\
00438   case ADDR_IMPLIED:\
00439               size += 0;\
00440        break;\
00441   case ADDR_STACK:\
00442               size += 0;\
00443        break;\
00444   case ADDR_DIR:\
00445        args[0] = asR_W65_ABS8;\
00446        print_operand (1, "  <$0", args);\
00447        size += 1;\
00448        break;\
00449   case ADDR_DIR_IDX_X:\
00450        args[0] = asR_W65_ABS8;\
00451        print_operand (1, "  <$0,x", args);\
00452        size += 1;\
00453        break;\
00454   case ADDR_DIR_IDX_Y:\
00455        args[0] = asR_W65_ABS8;\
00456        print_operand (1, "  <$0,y", args);\
00457        size += 1;\
00458        break;\
00459   case ADDR_DIR_IND:\
00460        args[0] = asR_W65_ABS8;\
00461        print_operand (1, "  (<$0)", args);\
00462        size += 1;\
00463        break;\
00464   case ADDR_DIR_IDX_IND_X:\
00465        args[0] = asR_W65_ABS8;\
00466        print_operand (1, "  (<$0,x)", args);\
00467        size += 1;\
00468        break;\
00469   case ADDR_DIR_IND_IDX_Y:\
00470        args[0] = asR_W65_ABS8;\
00471        print_operand (1, "  (<$0),y", args);\
00472        size += 1;\
00473        break;\
00474   case ADDR_DIR_IND_LONG:\
00475        args[0] = asR_W65_ABS8;\
00476        print_operand (1, "  [$0]", args);\
00477        size += 1;\
00478        break;\
00479   case ADDR_DIR_IND_IDX_Y_LONG:\
00480        args[0] = asR_W65_ABS8;\
00481        print_operand (1, "  [$0],y", args);\
00482        size += 1;\
00483        break;\
00484   case ADDR_ABS:\
00485        args[0] = asR_W65_ABS16;\
00486        print_operand (1, "  !$0", args);\
00487        size += 2;\
00488        break;\
00489   case ADDR_ABS_IDX_X:\
00490        args[0] = asR_W65_ABS16;\
00491        print_operand (1, "  !$0,x", args);\
00492        size += 2;\
00493        break;\
00494   case ADDR_ABS_IDX_Y:\
00495        args[0] = asR_W65_ABS16;\
00496        print_operand (1, "  !$0,y", args);\
00497        size += 2;\
00498        break;\
00499   case ADDR_ABS_LONG:\
00500        args[0] = asR_W65_ABS24;\
00501        print_operand (1, "  >$0", args);\
00502        size += 3;\
00503        break;\
00504   case ADDR_ABS_IND_LONG:\
00505        args[0] = asR_W65_ABS16;\
00506        print_operand (1, "  [>$0]", args);\
00507        size += 2;\
00508        break;\
00509   case ADDR_ABS_LONG_IDX_X:\
00510        args[0] = asR_W65_ABS24;\
00511        print_operand (1, "  >$0,x", args);\
00512        size += 3;\
00513        break;\
00514   case ADDR_STACK_REL:\
00515        args[0] = asR_W65_ABS8;\
00516        print_operand (0, "  $0,s", args);\
00517        size += 1;\
00518        break;\
00519   case ADDR_STACK_REL_INDX_IDX:\
00520        args[0] = asR_W65_ABS8;\
00521        print_operand (0, "  ($0,s),y", args);\
00522        size += 1;\
00523        break;\
00524   case ADDR_ABS_IND:\
00525        args[0] = asR_W65_ABS16;\
00526        print_operand (1, "  ($0)", args);\
00527        size += 2;\
00528        break;\
00529   case ADDR_ABS_IND_IDX:\
00530        args[0] = asR_W65_ABS16;\
00531        print_operand (1, "  ($0,x)", args);\
00532        size += 2;\
00533        break;\
00534   case ADDR_BLOCK_MOVE:\
00535        args[0] = (asR_W65_ABS16 >>8) &0xff;\
00536        args[1] = ( asR_W65_ABS16 & 0xff);\
00537        print_operand (0,"   $0,$1",args);\
00538        size += 2;\
00539        break;\
00540 
00541 #define GETINFO(size,type,pcrel)\
00542        case ADDR_IMMTOA: size = M==0 ? 2:1;type=M==0 ? R_W65_ABS16 : R_W65_ABS8;pcrel=0;break;\
00543        case ADDR_IMMCOP: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00544        case ADDR_IMMTOI: size = X==0 ? 2:1;type=X==0 ? R_W65_ABS16 : R_W65_ABS8;pcrel=0;break;\
00545        case ADDR_ACC: size = 0;type=-1;pcrel=0;break;\
00546        case ADDR_PC_REL: size = 1;type=R_W65_PCR8;pcrel=0;break;\
00547        case ADDR_PC_REL_LONG: size = 2;type=R_W65_PCR16;pcrel=0;break;\
00548        case ADDR_IMPLIED: size = 0;type=-1;pcrel=0;break;\
00549        case ADDR_STACK: size = 0;type=-1;pcrel=0;break;\
00550        case ADDR_DIR: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00551        case ADDR_DIR_IDX_X: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00552        case ADDR_DIR_IDX_Y: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00553        case ADDR_DIR_IND: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00554        case ADDR_DIR_IDX_IND_X: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00555        case ADDR_DIR_IND_IDX_Y: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00556        case ADDR_DIR_IND_LONG: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00557        case ADDR_DIR_IND_IDX_Y_LONG: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00558        case ADDR_ABS: size = 2;type=R_W65_ABS16;pcrel=0;break;\
00559        case ADDR_ABS_IDX_X: size = 2;type=R_W65_ABS16;pcrel=0;break;\
00560        case ADDR_ABS_IDX_Y: size = 2;type=R_W65_ABS16;pcrel=0;break;\
00561        case ADDR_ABS_LONG: size = 3;type=R_W65_ABS24;pcrel=0;break;\
00562        case ADDR_ABS_IND_LONG: size = 2;type=R_W65_ABS16;pcrel=0;break;\
00563        case ADDR_ABS_LONG_IDX_X: size = 3;type=R_W65_ABS24;pcrel=0;break;\
00564        case ADDR_STACK_REL: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00565        case ADDR_STACK_REL_INDX_IDX: size = 1;type=R_W65_ABS8;pcrel=0;break;\
00566        case ADDR_ABS_IND: size = 2;type=R_W65_ABS16;pcrel=0;break;\
00567        case ADDR_ABS_IND_IDX: size = 2;type=R_W65_ABS16;pcrel=0;break;\
00568        case ADDR_BLOCK_MOVE: size = 2;type=-1;pcrel=0;break;\
00569