📄 m68hc11-opc.c
字号:
/* m68hc11-opc.c -- Motorola 68HC11 & 68HC12 opcode list Copyright 1999, 2000 Free Software Foundation, Inc. Written by Stephane Carrez (stcarrez@worldnet.fr)This file is part of GDB, GAS, and the GNU binutils.GDB, GAS, and the GNU binutils are free software; you can redistributethem and/or modify them under the terms of the GNU General PublicLicense as published by the Free Software Foundation; either version2, or (at your option) any later version.GDB, GAS, and the GNU binutils are distributed in the hope that theywill be useful, but WITHOUT ANY WARRANTY; without even the impliedwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Seethe GNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this file; see the file COPYING. If not, write to the FreeSoftware Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*/#include <stdio.h>#include "ansidecl.h"#include "opcode/m68hc11.h"#define TABLE_SIZE(X) (sizeof(X) / sizeof(X[0]))/* Combination of CCR flags. */#define M6811_ZC_BIT M6811_Z_BIT|M6811_C_BIT#define M6811_NZ_BIT M6811_N_BIT|M6811_Z_BIT#define M6811_NZV_BIT M6811_N_BIT|M6811_Z_BIT|M6811_V_BIT#define M6811_NZC_BIT M6811_N_BIT|M6811_Z_BIT|M6811_C_BIT#define M6811_NVC_BIT M6811_N_BIT|M6811_V_BIT|M6811_C_BIT#define M6811_ZVC_BIT M6811_Z_BIT|M6811_V_BIT|M6811_C_BIT#define M6811_NZVC_BIT M6811_ZVC_BIT|M6811_N_BIT#define M6811_HNZVC_BIT M6811_NZVC_BIT|M6811_H_BIT#define M6811_HNVC_BIT M6811_NVC_BIT|M6811_H_BIT#define M6811_VC_BIT M6811_V_BIT|M6811_C_BIT/* Flags when the insn only changes some CCR flags. */#define CHG_NONE 0,0,0#define CHG_Z 0,0,M6811_Z_BIT#define CHG_C 0,0,M6811_C_BIT#define CHG_ZVC 0,0,M6811_ZVC_BIT#define CHG_NZC 0,0,M6811_NZC_BIT#define CHG_NZV 0,0,M6811_NZV_BIT#define CHG_NZVC 0,0,M6811_NZVC_BIT#define CHG_HNZVC 0,0,M6811_HNZVC_BIT#define CHG_ALL 0,0,0xff/* The insn clears and changes some flags. */#define CLR_I 0,M6811_I_BIT,0#define CLR_C 0,M6811_C_BIT,0#define CLR_V 0,M6811_V_BIT,0#define CLR_V_CHG_ZC 0,M6811_V_BIT,M6811_ZC_BIT#define CLR_V_CHG_NZ 0,M6811_V_BIT,M6811_NZ_BIT#define CLR_V_CHG_ZVC 0,M6811_V_BIT,M6811_ZVC_BIT#define CLR_N_CHG_ZVC 0,M6811_N_BIT,M6811_ZVC_BIT /* Used by lsr */#define CLR_VC_CHG_NZ 0,M6811_VC_BIT,M6811_NZ_BIT/* The insn sets some flags. */#define SET_I M6811_I_BIT,0,0#define SET_C M6811_C_BIT,0,0#define SET_V M6811_V_BIT,0,0#define SET_Z_CLR_NVC M6811_Z_BIT,M6811_NVC_BIT,0#define SET_C_CLR_V_CHG_NZ M6811_C_BIT,M6811_V_BIT,M6811_NZ_BIT#define SET_Z_CHG_HNVC M6811_Z_BIT,0,M6811_HNVC_BIT#define _M 0xff#define OP_NONE M6811_OP_NONE#define OP_PAGE2 M6811_OP_PAGE2#define OP_PAGE3 M6811_OP_PAGE3#define OP_PAGE4 M6811_OP_PAGE4#define OP_IMM8 M6811_OP_IMM8#define OP_IMM16 M6811_OP_IMM16#define OP_IX M6811_OP_IX#define OP_IY M6811_OP_IY#define OP_IND16 M6811_OP_IND16#define OP_IDX M6812_OP_IDX#define OP_IDX_1 M6812_OP_IDX_1#define OP_IDX_2 M6812_OP_IDX_2#define OP_D_IDX M6812_OP_D_IDX#define OP_D_IDX_2 M6812_OP_D_IDX_2#define OP_DIRECT M6811_OP_DIRECT#define OP_BITMASK M6811_OP_BITMASK#define OP_JUMP_REL M6811_OP_JUMP_REL#define OP_JUMP_REL16 M6812_OP_JUMP_REL16#define OP_REG M6812_OP_REG#define OP_REG_1 M6812_OP_REG#define OP_REG_2 M6812_OP_REG_2#define OP_IDX_p2 M6812_OP_IDX_P2#define OP_IND16_p2 M6812_OP_IND16_P2#define OP_TRAP_ID M6812_OP_TRAP_ID#define OP_EXG_MARKER M6812_OP_EXG_MARKER#define OP_TFR_MARKER M6812_OP_TFR_MARKER#define OP_DBEQ_MARKER (M6812_OP_DBCC_MARKER|M6812_OP_EQ_MARKER)#define OP_DBNE_MARKER (M6812_OP_DBCC_MARKER)#define OP_TBEQ_MARKER (M6812_OP_TBCC_MARKER|M6812_OP_EQ_MARKER)#define OP_TBNE_MARKER (M6812_OP_TBCC_MARKER)#define OP_IBEQ_MARKER (M6812_OP_IBCC_MARKER|M6812_OP_EQ_MARKER)#define OP_IBNE_MARKER (M6812_OP_IBCC_MARKER)/* { "test", OP_NONE, 1, 0x00, 5, _M, CHG_NONE, cpu6811 }, +-- cpu Name -+ +------- Insn CCR changes Format ------+ +----------- Max # cycles Size --------------------+ +--------------- Min # cycles +--------------------- Opcode*/const struct m68hc11_opcode m68hc11_opcodes[] = { { "aba", OP_NONE, 1, 0x1b, 2, 2, CHG_HNZVC, cpu6811 }, { "aba", OP_NONE | OP_PAGE2,2, 0x06, 2, 2, CHG_HNZVC, cpu6812 }, { "abx", OP_NONE, 1, 0x3a, 3, 3, CHG_NONE, cpu6811 }, { "aby", OP_NONE | OP_PAGE2,2, 0x3a, 4, 4, CHG_NONE, cpu6811 }, { "adca", OP_IMM8, 2, 0x89, 1, 1, CHG_HNZVC, cpu6811|cpu6812 }, { "adca", OP_DIRECT, 2, 0x99, 3, 3, CHG_HNZVC, cpu6811|cpu6812 }, { "adca", OP_IND16, 3, 0xb9, 3, 3, CHG_HNZVC, cpu6811|cpu6812 }, { "adca", OP_IX, 2, 0xa9, 4, 4, CHG_HNZVC, cpu6811 }, { "adca", OP_IY | OP_PAGE2, 3, 0xa9, 5, 5, CHG_HNZVC, cpu6811 }, { "adca", OP_IDX, 2, 0xa9, 3, 3, CHG_HNZVC, cpu6812 }, { "adca", OP_IDX_1, 3, 0xa9, 3, 3, CHG_HNZVC, cpu6812 }, { "adca", OP_IDX_2, 4, 0xa9, 4, 4, CHG_HNZVC, cpu6812 }, { "adca", OP_D_IDX, 2, 0xa9, 6, 6, CHG_HNZVC, cpu6812 }, { "adca", OP_D_IDX_2, 4, 0xa9, 6, 6, CHG_HNZVC, cpu6812 }, { "adcb", OP_IMM8, 2, 0xc9, 1, 1, CHG_HNZVC, cpu6811|cpu6812 }, { "adcb", OP_DIRECT, 2, 0xd9, 3, 3, CHG_HNZVC, cpu6811|cpu6812 }, { "adcb", OP_IND16, 3, 0xf9, 3, 3, CHG_HNZVC, cpu6811|cpu6812 }, { "adcb", OP_IX, 2, 0xe9, 4, 4, CHG_HNZVC, cpu6811 }, { "adcb", OP_IY | OP_PAGE2, 3, 0xe9, 5, 5, CHG_HNZVC, cpu6811 }, { "adcb", OP_IDX, 2, 0xe9, 3, 3, CHG_HNZVC, cpu6812 }, { "adcb", OP_IDX_1, 3, 0xe9, 3, 3, CHG_HNZVC, cpu6812 }, { "adcb", OP_IDX_2, 4, 0xe9, 4, 4, CHG_HNZVC, cpu6812 }, { "adcb", OP_D_IDX, 2, 0xe9, 6, 6, CHG_HNZVC, cpu6812 }, { "adcb", OP_D_IDX_2, 4, 0xe9, 6, 6, CHG_HNZVC, cpu6812 }, { "adda", OP_IMM8, 2, 0x8b, 1, 1, CHG_HNZVC, cpu6811|cpu6812 }, { "adda", OP_DIRECT, 2, 0x9b, 3, 3, CHG_HNZVC, cpu6811|cpu6812 }, { "adda", OP_IND16, 3, 0xbb, 3, 3, CHG_HNZVC, cpu6811|cpu6812 }, { "adda", OP_IX, 2, 0xab, 4, 4, CHG_HNZVC, cpu6811 }, { "adda", OP_IY | OP_PAGE2, 3, 0xab, 5, 5, CHG_HNZVC, cpu6811 }, { "adda", OP_IDX, 2, 0xab, 3, 3, CHG_HNZVC, cpu6812 }, { "adda", OP_IDX_1, 3, 0xab, 3, 3, CHG_HNZVC, cpu6812 }, { "adda", OP_IDX_2, 4, 0xab, 4, 4, CHG_HNZVC, cpu6812 }, { "adda", OP_D_IDX, 2, 0xab, 6, 6, CHG_HNZVC, cpu6812 }, { "adda", OP_D_IDX_2, 4, 0xab, 6, 6, CHG_HNZVC, cpu6812 }, { "addb", OP_IMM8, 2, 0xcb, 1, 1, CHG_HNZVC, cpu6811|cpu6812 }, { "addb", OP_DIRECT, 2, 0xdb, 3, 3, CHG_HNZVC, cpu6811|cpu6812 }, { "addb", OP_IND16, 3, 0xfb, 3, 3, CHG_HNZVC, cpu6811|cpu6812 }, { "addb", OP_IX, 2, 0xeb, 4, 4, CHG_HNZVC, cpu6811 }, { "addb", OP_IY | OP_PAGE2, 3, 0xeb, 5, 5, CHG_HNZVC, cpu6811 }, { "addb", OP_IDX, 2, 0xeb, 3, 3, CHG_HNZVC, cpu6812 }, { "addb", OP_IDX_1, 3, 0xeb, 3, 3, CHG_HNZVC, cpu6812 }, { "addb", OP_IDX_2, 4, 0xeb, 4, 4, CHG_HNZVC, cpu6812 }, { "addb", OP_D_IDX, 2, 0xeb, 6, 6, CHG_HNZVC, cpu6812 }, { "addb", OP_D_IDX_2, 4, 0xeb, 6, 6, CHG_HNZVC, cpu6812 }, { "addd", OP_IMM16, 3, 0xc3, 2, 2, CHG_NZVC, cpu6811|cpu6812 }, { "addd", OP_DIRECT, 2, 0xd3, 3, 3, CHG_NZVC, cpu6811|cpu6812 }, { "addd", OP_IND16, 3, 0xf3, 3, 3, CHG_NZVC, cpu6811|cpu6812 }, { "addd", OP_IX, 2, 0xe3, 6, 6, CHG_NZVC, cpu6811 }, { "addd", OP_IY | OP_PAGE2, 3, 0xe3, 7, 7, CHG_NZVC, cpu6811 }, { "addd", OP_IDX, 2, 0xe3, 3, 3, CHG_NZVC, cpu6812 }, { "addd", OP_IDX_1, 3, 0xe3, 3, 3, CHG_NZVC, cpu6812 }, { "addd", OP_IDX_2, 4, 0xe3, 4, 4, CHG_NZVC, cpu6812 }, { "addd", OP_D_IDX, 2, 0xe3, 6, 6, CHG_NZVC, cpu6812 }, { "addd", OP_D_IDX_2, 4, 0xe3, 6, 6, CHG_NZVC, cpu6812 }, { "anda", OP_IMM8, 2, 0x84, 1, 1, CLR_V_CHG_NZ, cpu6811|cpu6812 }, { "anda", OP_DIRECT, 2, 0x94, 3, 3, CLR_V_CHG_NZ, cpu6811|cpu6812 }, { "anda", OP_IND16, 3, 0xb4, 3, 3, CLR_V_CHG_NZ, cpu6811|cpu6812 }, { "anda", OP_IX, 2, 0xa4, 4, 4, CLR_V_CHG_NZ, cpu6811 }, { "anda", OP_IY | OP_PAGE2, 3, 0xa4, 5, 5, CLR_V_CHG_NZ, cpu6811 }, { "anda", OP_IDX, 2, 0xa4, 3, 3, CLR_V_CHG_NZ, cpu6812 }, { "anda", OP_IDX_1, 3, 0xa4, 3, 3, CLR_V_CHG_NZ, cpu6812 }, { "anda", OP_IDX_2, 4, 0xa4, 4, 4, CLR_V_CHG_NZ, cpu6812 }, { "anda", OP_D_IDX, 2, 0xa4, 6, 6, CLR_V_CHG_NZ, cpu6812 }, { "anda", OP_D_IDX_2, 4, 0xa4, 6, 6, CLR_V_CHG_NZ, cpu6812 }, { "andb", OP_IMM8, 2, 0xc4, 1, 1, CLR_V_CHG_NZ, cpu6811|cpu6812 }, { "andb", OP_DIRECT, 2, 0xd4, 3, 3, CLR_V_CHG_NZ, cpu6811|cpu6812 }, { "andb", OP_IND16, 3, 0xf4, 3, 3, CLR_V_CHG_NZ, cpu6811|cpu6812 }, { "andb", OP_IX, 2, 0xe4, 4, 4, CLR_V_CHG_NZ, cpu6811 }, { "andb", OP_IY | OP_PAGE2, 3, 0xe4, 5, 5, CLR_V_CHG_NZ, cpu6811 }, { "andb", OP_IDX, 2, 0xe4, 3, 3, CLR_V_CHG_NZ, cpu6812 }, { "andb", OP_IDX_1, 3, 0xe4, 3, 3, CLR_V_CHG_NZ, cpu6812 }, { "andb", OP_IDX_2, 4, 0xe4, 4, 4, CLR_V_CHG_NZ, cpu6812 }, { "andb", OP_D_IDX, 2, 0xe4, 6, 6, CLR_V_CHG_NZ, cpu6812 }, { "andb", OP_D_IDX_2, 4, 0xe4, 6, 6, CLR_V_CHG_NZ, cpu6812 }, { "andcc", OP_IMM8, 2, 0x10, 1, 1, CHG_ALL, cpu6812 }, { "asl", OP_IND16, 3, 0x78, 4, 4, CHG_NZVC, cpu6811|cpu6812 }, { "asl", OP_IX, 2, 0x68, 6, 6, CHG_NZVC, cpu6811 }, { "asl", OP_IY | OP_PAGE2, 3, 0x68, 7, 7, CHG_NZVC, cpu6811 }, { "asl", OP_IDX, 2, 0x68, 3, 3, CHG_NZVC, cpu6812 }, { "asl", OP_IDX_1, 3, 0x68, 4, 4, CHG_NZVC, cpu6812 }, { "asl", OP_IDX_2, 4, 0x68, 5, 5, CHG_NZVC, cpu6812 }, { "asl", OP_D_IDX, 2, 0x68, 6, 6, CHG_NZVC, cpu6812 }, { "asl", OP_D_IDX_2, 4, 0x68, 6, 6, CHG_NZVC, cpu6812 }, { "asla", OP_NONE, 1, 0x48, 1, 1, CHG_NZVC, cpu6811|cpu6812 }, { "aslb", OP_NONE, 1, 0x58, 1, 1, CHG_NZVC, cpu6811|cpu6812 }, { "asld", OP_NONE, 1, 0x05, 3, 3, CHG_NZVC, cpu6811 }, { "asld", OP_NONE, 1, 0x59, 1, 1, CHG_NZVC, cpu6812 }, { "asr", OP_IND16, 3, 0x77, 4, 4, CHG_NZVC, cpu6811|cpu6812 }, { "asr", OP_IX, 2, 0x67, 6, 6, CHG_NZVC, cpu6811 }, { "asr", OP_IY | OP_PAGE2, 3, 0x67, 7, 7, CHG_NZVC, cpu6811 }, { "asr", OP_IDX, 2, 0x67, 3, 3, CHG_NZVC, cpu6812 }, { "asr", OP_IDX_1, 3, 0x67, 4, 4, CHG_NZVC, cpu6812 }, { "asr", OP_IDX_2, 4, 0x67, 5, 5, CHG_NZVC, cpu6812 },
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -