Rizin
unix-like reverse engineering framework and cli tools
h8300_disas.h File Reference
#include <stdint.h>

Go to the source code of this file.

Classes

struct  h8300_cmd
 

Macros

#define H8300_INSTR_MAXLEN   20
 

Enumerations

enum  h8300_4bit_opcodes {
  H8300_MOV_4BIT_2 = 0x2 , H8300_MOV_4BIT_3 = 0x3 , H8300_ADD_4BIT = 0x8 , H8300_ADDX_4BIT = 0x9 ,
  H8300_CMP_4BIT = 0xA , H8300_SUBX_4BIT = 0xB , H8300_OR_4BIT = 0xC , H8300_XOR_4BIT = 0xD ,
  H8300_AND_4BIT = 0xE , H8300_MOV_4BIT = 0xF
}
 
enum  h8300_opcodes {
  H8300_NOP = 0x00 , H8300_SLEEP = 0x01 , H8300_STC = 0x02 , H8300_LDC = 0x03 ,
  H8300_ORC = 0x04 , H8300_XORC = 0x05 , H8300_ANDC = 0x06 , H8300_LDC_2 = 0x07 ,
  H8300_ADDB_DIRECT = 0x08 , H8300_ADDW_DIRECT = 0x09 , H8300_INC = 0x0A , H8300_ADDS = 0x0B ,
  H8300_MOV_1 = 0x0C , H8300_MOV_2 = 0x0D , H8300_ADDX = 0x0E , H8300_DAA = 0x0F ,
  H8300_SHL = 0x10 , H8300_SHR = 0x11 , H8300_ROTL = 0x12 , H8300_ROTR = 0x13 ,
  H8300_OR = 0x14 , H8300_XOR = 0x15 , H8300_AND = 0x16 , H8300_NOT_NEG = 0x17 ,
  H8300_SUB_1 = 0x18 , H8300_SUBW = 0x19 , H8300_DEC = 0x1A , H8300_SUBS = 0x1B ,
  H8300_CMP_1 = 0x1C , H8300_CMP_2 = 0x1D , H8300_SUBX = 0x1E , H8300_DAS = 0x1F ,
  H8300_BRA = 0x40 , H8300_BRN = 0x41 , H8300_BHI = 0x42 , H8300_BLS = 0x43 ,
  H8300_BCC = 0x44 , H8300_BCS = 0x45 , H8300_BNE = 0x46 , H8300_BEQ = 0x47 ,
  H8300_BVC = 0x48 , H8300_BVS = 0x49 , H8300_BPL = 0x4A , H8300_BMI = 0x4B ,
  H8300_BGE = 0x4C , H8300_BLT = 0x4D , H8300_BGT = 0x4E , H8300_BLE = 0x4F ,
  H8300_MULXU = 0x50 , H8300_DIVXU = 0x51 , H8300_RTS = 0x54 , H8300_BSR = 0x55 ,
  H8300_RTE = 0x56 , H8300_JMP_1 = 0x59 , H8300_JMP_2 = 0x5A , H8300_JMP_3 = 0x5B ,
  H8300_JSR_1 = 0x5D , H8300_JSR_2 = 0x5E , H8300_JSR_3 = 0x5F , H8300_BSET_1 = 0x60 ,
  H8300_BNOT_1 = 0x61 , H8300_BCLR_R2R8 = 0x62 , H8300_BTST_R2R8 = 0x63 , H8300_BST_BIST = 0x67 ,
  H8300_MOV_R82IND16 = 0x68 , H8300_MOV_IND162R16 = 0x69 , H8300_MOV_R82ABS16 = 0x6a , H8300_MOV_ABS162R16 = 0x6B ,
  H8300_MOV_R82RDEC16 = 0x6C , H8300_MOV_INDINC162R16 = 0x6D , H8300_MOV_R82DISPR16 = 0x6E , H8300_MOV_DISP162R16 = 0x6F ,
  H8300_BSET_2 = 0x70 , H8300_BNOT_2 = 0x71 , H8300_BCLR_IMM2R8 = 0x72 , H8300_BTST = 0x73 ,
  H8300_BOR_BIOR = 0x74 , H8300_BXOR_BIXOR = 0x75 , H8300_BAND_BIAND = 0x76 , H8300_BILD_IMM2R8 = 0x77 ,
  H8300_MOV_IMM162R16 = 0x79 , H8300_EEPMOV = 0x7B , H8300_BIAND_IMM2IND16 = 0x7C , H8300_BCLR_R2IND16 = 0x7D ,
  H8300_BIAND_IMM2ABS8 = 0x7E , H8300_BCLR_R2ABS8 = 0x7F
}
 
enum  h8300_opcodes_9bit {
  H8300_BST = 0x6700 >> 7 , H8300_BIST = 0x6780 >> 7 , H8300_BOR = 0x7400 >> 7 , H8300_BIOR = 0x7480 >> 7 ,
  H8300_BXOR = 0x7500 >> 7 , H8300_BIXOR = 0x7580 >> 7 , H8300_BAND = 0x7600 >> 7 , H8300_BIAND = 0x7680 >> 7 ,
  H8300_BLD = 0x7700 >> 7 , H8300_BILD = 0x7780 >> 7
}
 

Functions

int h8300_decode_command (const ut8 *instr, struct h8300_cmd *cmd)
 

Macro Definition Documentation

◆ H8300_INSTR_MAXLEN

#define H8300_INSTR_MAXLEN   20

Definition at line 111 of file h8300_disas.h.

Enumeration Type Documentation

◆ h8300_4bit_opcodes

Enumerator
H8300_MOV_4BIT_2 
H8300_MOV_4BIT_3 
H8300_ADD_4BIT 
H8300_ADDX_4BIT 
H8300_CMP_4BIT 
H8300_SUBX_4BIT 
H8300_OR_4BIT 
H8300_XOR_4BIT 
H8300_AND_4BIT 
H8300_MOV_4BIT 

Definition at line 9 of file h8300_disas.h.

9  {
10  H8300_MOV_4BIT_2 = 0x2,
11  H8300_MOV_4BIT_3 = 0x3,
12  H8300_ADD_4BIT = 0x8,
13  H8300_ADDX_4BIT = 0x9,
14  H8300_CMP_4BIT = 0xA,
15  H8300_SUBX_4BIT = 0xB,
16  H8300_OR_4BIT = 0xC,
17  H8300_XOR_4BIT = 0xD,
18  H8300_AND_4BIT = 0xE,
19  H8300_MOV_4BIT = 0xF,
20 };
@ H8300_MOV_4BIT_2
Definition: h8300_disas.h:10
@ H8300_ADDX_4BIT
Definition: h8300_disas.h:13
@ H8300_ADD_4BIT
Definition: h8300_disas.h:12
@ H8300_OR_4BIT
Definition: h8300_disas.h:16
@ H8300_AND_4BIT
Definition: h8300_disas.h:18
@ H8300_MOV_4BIT_3
Definition: h8300_disas.h:11
@ H8300_CMP_4BIT
Definition: h8300_disas.h:14
@ H8300_XOR_4BIT
Definition: h8300_disas.h:17
@ H8300_SUBX_4BIT
Definition: h8300_disas.h:15
@ H8300_MOV_4BIT
Definition: h8300_disas.h:19

◆ h8300_opcodes

Enumerator
H8300_NOP 
H8300_SLEEP 
H8300_STC 
H8300_LDC 
H8300_ORC 
H8300_XORC 
H8300_ANDC 
H8300_LDC_2 
H8300_ADDB_DIRECT 
H8300_ADDW_DIRECT 
H8300_INC 
H8300_ADDS 
H8300_MOV_1 
H8300_MOV_2 
H8300_ADDX 
H8300_DAA 
H8300_SHL 
H8300_SHR 
H8300_ROTL 
H8300_ROTR 
H8300_OR 
H8300_XOR 
H8300_AND 
H8300_NOT_NEG 
H8300_SUB_1 
H8300_SUBW 
H8300_DEC 
H8300_SUBS 
H8300_CMP_1 
H8300_CMP_2 
H8300_SUBX 
H8300_DAS 
H8300_BRA 
H8300_BRN 
H8300_BHI 
H8300_BLS 
H8300_BCC 
H8300_BCS 
H8300_BNE 
H8300_BEQ 
H8300_BVC 
H8300_BVS 
H8300_BPL 
H8300_BMI 
H8300_BGE 
H8300_BLT 
H8300_BGT 
H8300_BLE 
H8300_MULXU 
H8300_DIVXU 
H8300_RTS 
H8300_BSR 
H8300_RTE 
H8300_JMP_1 
H8300_JMP_2 
H8300_JMP_3 
H8300_JSR_1 
H8300_JSR_2 
H8300_JSR_3 
H8300_BSET_1 
H8300_BNOT_1 
H8300_BCLR_R2R8 
H8300_BTST_R2R8 
H8300_BST_BIST 
H8300_MOV_R82IND16 
H8300_MOV_IND162R16 
H8300_MOV_R82ABS16 
H8300_MOV_ABS162R16 
H8300_MOV_R82RDEC16 
H8300_MOV_INDINC162R16 
H8300_MOV_R82DISPR16 
H8300_MOV_DISP162R16 
H8300_BSET_2 
H8300_BNOT_2 
H8300_BCLR_IMM2R8 
H8300_BTST 
H8300_BOR_BIOR 
H8300_BXOR_BIXOR 
H8300_BAND_BIAND 
H8300_BILD_IMM2R8 
H8300_MOV_IMM162R16 
H8300_EEPMOV 
H8300_BIAND_IMM2IND16 
H8300_BCLR_R2IND16 
H8300_BIAND_IMM2ABS8 
H8300_BCLR_R2ABS8 

Definition at line 22 of file h8300_disas.h.

22  {
23  H8300_NOP = 0x00,
24  H8300_SLEEP = 0x01,
25  H8300_STC = 0x02,
26  H8300_LDC = 0x03,
27  H8300_ORC = 0x04,
28  H8300_XORC = 0x05,
29  H8300_ANDC = 0x06,
30  H8300_LDC_2 = 0x07,
31  H8300_ADDB_DIRECT = 0x08,
32  H8300_ADDW_DIRECT = 0x09,
33  H8300_INC = 0x0A,
34  H8300_ADDS = 0x0B,
35  H8300_MOV_1 = 0x0C,
36  H8300_MOV_2 = 0x0D,
37  H8300_ADDX = 0x0E,
38  H8300_DAA = 0x0F,
39  H8300_SHL = 0x10,
40  H8300_SHR = 0x11,
41  H8300_ROTL = 0x12,
42  H8300_ROTR = 0x13,
43  H8300_OR = 0x14,
44  H8300_XOR = 0x15,
45  H8300_AND = 0x16,
46  H8300_NOT_NEG = 0x17,
47  H8300_SUB_1 = 0x18,
48  H8300_SUBW = 0x19,
49  H8300_DEC = 0x1A,
50  H8300_SUBS = 0x1B,
51  H8300_CMP_1 = 0x1C,
52  H8300_CMP_2 = 0x1D,
53  H8300_SUBX = 0x1E,
54  H8300_DAS = 0x1F,
55  H8300_BRA = 0x40,
56  H8300_BRN = 0x41,
57  H8300_BHI = 0x42,
58  H8300_BLS = 0x43,
59  H8300_BCC = 0x44,
60  H8300_BCS = 0x45,
61  H8300_BNE = 0x46,
62  H8300_BEQ = 0x47,
63  H8300_BVC = 0x48,
64  H8300_BVS = 0x49,
65  H8300_BPL = 0x4A,
66  H8300_BMI = 0x4B,
67  H8300_BGE = 0x4C,
68  H8300_BLT = 0x4D,
69  H8300_BGT = 0x4E,
70  H8300_BLE = 0x4F,
71  H8300_MULXU = 0x50,
72  H8300_DIVXU = 0x51,
73  H8300_RTS = 0x54,
74  H8300_BSR = 0x55,
75  H8300_RTE = 0x56,
76  H8300_JMP_1 = 0x59,
77  H8300_JMP_2 = 0x5A,
78  H8300_JMP_3 = 0x5B,
79  H8300_JSR_1 = 0x5D,
80  H8300_JSR_2 = 0x5E,
81  H8300_JSR_3 = 0x5F,
82  H8300_BSET_1 = 0x60,
83  H8300_BNOT_1 = 0x61,
84  H8300_BCLR_R2R8 = 0x62,
85  H8300_BTST_R2R8 = 0x63,
86  H8300_BST_BIST = 0x67,
87  H8300_MOV_R82IND16 = 0x68,
88  H8300_MOV_IND162R16 = 0x69,
89  H8300_MOV_R82ABS16 = 0x6a,
90  H8300_MOV_ABS162R16 = 0x6B,
91  H8300_MOV_R82RDEC16 = 0x6C,
93  H8300_MOV_R82DISPR16 = 0x6E,
94  H8300_MOV_DISP162R16 = 0x6F,
95  H8300_BSET_2 = 0x70,
96  H8300_BNOT_2 = 0x71,
97  H8300_BCLR_IMM2R8 = 0x72,
98  H8300_BTST = 0x73,
99  H8300_BOR_BIOR = 0x74,
100  H8300_BXOR_BIXOR = 0x75,
101  H8300_BAND_BIAND = 0x76,
102  H8300_BILD_IMM2R8 = 0x77,
103  H8300_MOV_IMM162R16 = 0x79,
104  H8300_EEPMOV = 0x7B,
105  H8300_BIAND_IMM2IND16 = 0x7C,
106  H8300_BCLR_R2IND16 = 0x7D,
107  H8300_BIAND_IMM2ABS8 = 0x7E,
108  H8300_BCLR_R2ABS8 = 0x7F,
109 };
@ H8300_BGE
Definition: h8300_disas.h:67
@ H8300_ORC
Definition: h8300_disas.h:27
@ H8300_SUB_1
Definition: h8300_disas.h:47
@ H8300_SLEEP
Definition: h8300_disas.h:24
@ H8300_SUBS
Definition: h8300_disas.h:50
@ H8300_BCC
Definition: h8300_disas.h:59
@ H8300_MOV_IMM162R16
Definition: h8300_disas.h:103
@ H8300_BOR_BIOR
Definition: h8300_disas.h:99
@ H8300_SUBX
Definition: h8300_disas.h:53
@ H8300_DAS
Definition: h8300_disas.h:54
@ H8300_LDC_2
Definition: h8300_disas.h:30
@ H8300_SUBW
Definition: h8300_disas.h:48
@ H8300_ADDX
Definition: h8300_disas.h:37
@ H8300_BSET_1
Definition: h8300_disas.h:82
@ H8300_SHR
Definition: h8300_disas.h:40
@ H8300_BSR
Definition: h8300_disas.h:74
@ H8300_MOV_R82IND16
Definition: h8300_disas.h:87
@ H8300_BIAND_IMM2IND16
Definition: h8300_disas.h:105
@ H8300_EEPMOV
Definition: h8300_disas.h:104
@ H8300_BNOT_1
Definition: h8300_disas.h:83
@ H8300_BRA
Definition: h8300_disas.h:55
@ H8300_ROTR
Definition: h8300_disas.h:42
@ H8300_NOT_NEG
Definition: h8300_disas.h:46
@ H8300_BNE
Definition: h8300_disas.h:61
@ H8300_RTS
Definition: h8300_disas.h:73
@ H8300_CMP_2
Definition: h8300_disas.h:52
@ H8300_JMP_2
Definition: h8300_disas.h:77
@ H8300_MOV_1
Definition: h8300_disas.h:35
@ H8300_BMI
Definition: h8300_disas.h:66
@ H8300_ADDB_DIRECT
Definition: h8300_disas.h:31
@ H8300_MOV_INDINC162R16
Definition: h8300_disas.h:92
@ H8300_BLT
Definition: h8300_disas.h:68
@ H8300_BHI
Definition: h8300_disas.h:57
@ H8300_LDC
Definition: h8300_disas.h:26
@ H8300_BLS
Definition: h8300_disas.h:58
@ H8300_BVC
Definition: h8300_disas.h:63
@ H8300_MOV_R82DISPR16
Definition: h8300_disas.h:93
@ H8300_BPL
Definition: h8300_disas.h:65
@ H8300_MOV_ABS162R16
Definition: h8300_disas.h:90
@ H8300_BCLR_R2IND16
Definition: h8300_disas.h:106
@ H8300_RTE
Definition: h8300_disas.h:75
@ H8300_DEC
Definition: h8300_disas.h:49
@ H8300_NOP
Definition: h8300_disas.h:23
@ H8300_ROTL
Definition: h8300_disas.h:41
@ H8300_CMP_1
Definition: h8300_disas.h:51
@ H8300_MOV_2
Definition: h8300_disas.h:36
@ H8300_MOV_IND162R16
Definition: h8300_disas.h:88
@ H8300_BSET_2
Definition: h8300_disas.h:95
@ H8300_BIAND_IMM2ABS8
Definition: h8300_disas.h:107
@ H8300_INC
Definition: h8300_disas.h:33
@ H8300_XOR
Definition: h8300_disas.h:44
@ H8300_MOV_R82ABS16
Definition: h8300_disas.h:89
@ H8300_XORC
Definition: h8300_disas.h:28
@ H8300_OR
Definition: h8300_disas.h:43
@ H8300_DIVXU
Definition: h8300_disas.h:72
@ H8300_MOV_R82RDEC16
Definition: h8300_disas.h:91
@ H8300_ADDW_DIRECT
Definition: h8300_disas.h:32
@ H8300_BNOT_2
Definition: h8300_disas.h:96
@ H8300_BCS
Definition: h8300_disas.h:60
@ H8300_BCLR_R2R8
Definition: h8300_disas.h:84
@ H8300_BGT
Definition: h8300_disas.h:69
@ H8300_BAND_BIAND
Definition: h8300_disas.h:101
@ H8300_JSR_2
Definition: h8300_disas.h:80
@ H8300_BILD_IMM2R8
Definition: h8300_disas.h:102
@ H8300_JMP_3
Definition: h8300_disas.h:78
@ H8300_ANDC
Definition: h8300_disas.h:29
@ H8300_BST_BIST
Definition: h8300_disas.h:86
@ H8300_ADDS
Definition: h8300_disas.h:34
@ H8300_JSR_1
Definition: h8300_disas.h:79
@ H8300_MULXU
Definition: h8300_disas.h:71
@ H8300_JMP_1
Definition: h8300_disas.h:76
@ H8300_MOV_DISP162R16
Definition: h8300_disas.h:94
@ H8300_BLE
Definition: h8300_disas.h:70
@ H8300_BVS
Definition: h8300_disas.h:64
@ H8300_SHL
Definition: h8300_disas.h:39
@ H8300_BRN
Definition: h8300_disas.h:56
@ H8300_BTST_R2R8
Definition: h8300_disas.h:85
@ H8300_BEQ
Definition: h8300_disas.h:62
@ H8300_DAA
Definition: h8300_disas.h:38
@ H8300_BXOR_BIXOR
Definition: h8300_disas.h:100
@ H8300_BTST
Definition: h8300_disas.h:98
@ H8300_BCLR_R2ABS8
Definition: h8300_disas.h:108
@ H8300_JSR_3
Definition: h8300_disas.h:81
@ H8300_BCLR_IMM2R8
Definition: h8300_disas.h:97
@ H8300_AND
Definition: h8300_disas.h:45
@ H8300_STC
Definition: h8300_disas.h:25

◆ h8300_opcodes_9bit

Enumerator
H8300_BST 
H8300_BIST 
H8300_BOR 
H8300_BIOR 
H8300_BXOR 
H8300_BIXOR 
H8300_BAND 
H8300_BIAND 
H8300_BLD 
H8300_BILD 

Definition at line 113 of file h8300_disas.h.

113  {
114  H8300_BST = 0x6700 >> 7,
115  H8300_BIST = 0x6780 >> 7,
116  H8300_BOR = 0x7400 >> 7,
117  H8300_BIOR = 0x7480 >> 7,
118  H8300_BXOR = 0x7500 >> 7,
119  H8300_BIXOR = 0x7580 >> 7,
120  H8300_BAND = 0x7600 >> 7,
121  H8300_BIAND = 0x7680 >> 7,
122  H8300_BLD = 0x7700 >> 7,
123  H8300_BILD = 0x7780 >> 7,
124 };
@ H8300_BST
Definition: h8300_disas.h:114
@ H8300_BIXOR
Definition: h8300_disas.h:119
@ H8300_BAND
Definition: h8300_disas.h:120
@ H8300_BIAND
Definition: h8300_disas.h:121
@ H8300_BILD
Definition: h8300_disas.h:123
@ H8300_BLD
Definition: h8300_disas.h:122
@ H8300_BIST
Definition: h8300_disas.h:115
@ H8300_BOR
Definition: h8300_disas.h:116
@ H8300_BXOR
Definition: h8300_disas.h:118
@ H8300_BIOR
Definition: h8300_disas.h:117

Function Documentation

◆ h8300_decode_command()

int h8300_decode_command ( const ut8 instr,
struct h8300_cmd cmd 
)

Definition at line 779 of file h8300_disas.c.

779  {
780  int ret = 0;
781 
782  switch (instr[0] >> 4) {
783  case H8300_MOV_4BIT_3:
784  ret = decode_rzimm_short(instr, cmd);
785  break;
786  case H8300_MOV_4BIT_2:
787  ret = decode_abs2r_short(instr, cmd);
788  break;
789  case H8300_AND_4BIT:
790  case H8300_ADDX_4BIT:
791  case H8300_ADD_4BIT:
792  case H8300_CMP_4BIT:
793  case H8300_MOV_4BIT:
794  case H8300_OR_4BIT:
795  case H8300_SUBX_4BIT:
796  case H8300_XOR_4BIT:
797  ret = decode_imm2r_short(instr, cmd);
798  break;
799  }
800 
801  if (ret) {
802  {
803  return ret;
804  }
805  }
806 
807  switch (instr[0]) {
808  case H8300_ANDC:
809  ret = decode_andc(instr, cmd);
810  break;
811  case H8300_SUBS:
812  ret = decode_subs(instr, cmd);
813  break;
814  case H8300_ADDW_DIRECT:
815  case H8300_CMP_2:
816  ret = decode_r162r16(instr, cmd);
817  break;
818  case H8300_ADDS:
819  ret = decode_adds(instr, cmd);
820  break;
821  case H8300_BAND_BIAND:
822  case H8300_BCLR_IMM2R8:
823  case H8300_BST_BIST:
824  case H8300_BTST:
825  case H8300_BILD_IMM2R8:
826  case H8300_BOR_BIOR:
827  case H8300_BXOR_BIXOR:
828  case H8300_BNOT_2:
829  case H8300_BSET_2:
830  ret = decode_imm2r8(instr, cmd);
831  break;
832  case H8300_AND:
833  case H8300_ADDB_DIRECT:
834  case H8300_BCLR_R2R8:
835  case H8300_SUB_1:
836  case H8300_SUBX:
837  case H8300_ADDX:
838  case H8300_XOR:
839  case H8300_BNOT_1:
840  case H8300_BSET_1:
841  case H8300_CMP_1:
842  case H8300_MOV_1:
843  case H8300_BTST_R2R8:
844  ret = decode_r2r8(instr, cmd);
845  break;
846  case H8300_BCLR_R2IND16:
847  switch (instr[2]) {
848  case 0x60:
849  case 0x61:
850  case 0x62:
851  ret = decode_rzind16(instr, cmd);
852  break;
853  case 0x70:
854  case 0x71:
855  case 0x72:
856  case 0x67:
857  case 0x75:
858  ret = decode_imm2ind16(instr, cmd);
859  break;
860  default:
861  ret = -1;
862  }
863  break;
864  case H8300_BCLR_R2ABS8:
865  switch (instr[2]) {
866  case 0x60:
867  case 0x61:
868  case 0x62:
869  ret = decode_rzabs8(instr, cmd);
870  break;
871  case 0x67:
872  case 0x70:
873  case 0x71:
874  case 0x72:
875  ret = decode_imm2abs8(instr, cmd);
876  break;
877  default:
878  ret = -1;
879  }
880  break;
882  ret = decode_imm2ind16(instr, cmd);
883  break;
885  ret = decode_imm2abs8(instr, cmd);
886  break;
887  case H8300_BSR:
888  ret = decode_bsr(instr, cmd);
889  break;
890  case H8300_NOP:
891  ret = decode_nop(instr, cmd);
892  break;
893  case H8300_DAA:
894  case H8300_DAS:
895  case H8300_DEC:
896  case H8300_INC:
897  case H8300_NOT_NEG:
898  case H8300_ROTL:
899  case H8300_ROTR:
900  case H8300_SHL:
901  case H8300_SHR:
902  ret = decode_daa(instr, cmd);
903  break;
904  case H8300_DIVXU:
905  case H8300_MULXU:
906  ret = decode_r82r16(instr, cmd);
907  break;
908  case H8300_EEPMOV:
909  case H8300_RTS:
910  case H8300_RTE:
911  case H8300_SLEEP:
912  ret = decode_eepmov(instr, cmd);
913  break;
914  case H8300_JMP_1:
915  case H8300_JSR_1:
916  ret = decode_jmp_ind(instr, cmd);
917  break;
918  case H8300_JMP_2:
919  case H8300_JSR_2:
920  ret = decode_jmp_abs16(instr, cmd);
921  break;
922  case H8300_JMP_3:
923  case H8300_JSR_3:
924  case H8300_BRA:
925  case H8300_BRN:
926  case H8300_BHI:
927  case H8300_BLS:
928  case H8300_BCC:
929  case H8300_BCS:
930  case H8300_BNE:
931  case H8300_BEQ:
932  case H8300_BVC:
933  case H8300_BVS:
934  case H8300_BPL:
935  case H8300_BMI:
936  case H8300_BGE:
937  case H8300_BLT:
938  case H8300_BGT:
939  case H8300_BLE:
940  ret = decode_jmp_abs8(instr, cmd);
941  break;
942  case H8300_ORC:
943  case H8300_LDC:
944  case H8300_LDC_2:
945  case H8300_STC:
946  case H8300_XORC:
947  ret = decode_ldc(instr, cmd);
948  break;
949  case H8300_OR:
950  ret = decode_r2r8(instr, cmd);
951  break;
952  case H8300_MOV_2:
953  case H8300_SUBW:
954  ret = decode_r162r16(instr, cmd);
955  break;
956  case H8300_MOV_IMM162R16:
957  ret = decode_imm162r16(instr, cmd);
958  break;
959  case H8300_MOV_IND162R16:
960  ret = decode_ind162r16(instr, cmd);
961  break;
963  ret = decode_disp162r16(instr, cmd);
964  break;
966  ret = decode_indinc162r16(instr, cmd);
967  break;
968  case H8300_MOV_ABS162R16:
969  ret = decode_abs162r16(instr, cmd);
970  break;
971  case H8300_MOV_R82IND16:
972  ret = decode_r82ind16(instr, cmd);
973  break;
975  ret = decode_r82dispr16(instr, cmd);
976  break;
977  case H8300_MOV_R82RDEC16:
978  ret = decode_r82rdec16(instr, cmd);
979  break;
980  case H8300_MOV_R82ABS16:
981  ret = decode_r82abs16(instr, cmd);
982  break;
983  default:
984  return -1;
985  }
986 
987  return ret;
988 }
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags cmd
Definition: sflib.h:79
static int decode_abs162r16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:610
static int decode_r82abs16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:699
static int decode_indinc162r16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:374
static int decode_daa(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:523
static int decode_subs(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:509
int decode_jmp_abs16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:567
static int decode_imm162r16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:319
static int decode_nop(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:725
static int decode_imm2r8(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:419
static int decode_bsr(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:305
static int decode_imm2r_short(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:766
static int decode_eepmov(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:216
static int decode_jmp_ind(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:596
static int decode_r82r16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:551
static int decode_imm2abs8(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:448
static int decode_andc(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:272
static int decode_disp162r16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:335
static int decode_r82rdec16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:676
int decode_jmp_abs8(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:582
static int decode_rzind16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:478
static int decode_abs2r_short(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:737
static int decode_r82dispr16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:652
static int decode_r82ind16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:631
static int decode_r162r16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:258
static int decode_rzimm_short(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:752
static int decode_r2r8(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:462
static int decode_imm2ind16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:434
static int decode_ind162r16(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:398
static int decode_rzabs8(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:494
static int decode_ldc(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:234
static int decode_adds(const ut8 *bytes, struct h8300_cmd *cmd)
Definition: h8300_disas.c:284

References cmd, decode_abs162r16(), decode_abs2r_short(), decode_adds(), decode_andc(), decode_bsr(), decode_daa(), decode_disp162r16(), decode_eepmov(), decode_imm162r16(), decode_imm2abs8(), decode_imm2ind16(), decode_imm2r8(), decode_imm2r_short(), decode_ind162r16(), decode_indinc162r16(), decode_jmp_abs16(), decode_jmp_abs8(), decode_jmp_ind(), decode_ldc(), decode_nop(), decode_r162r16(), decode_r2r8(), decode_r82abs16(), decode_r82dispr16(), decode_r82ind16(), decode_r82r16(), decode_r82rdec16(), decode_rzabs8(), decode_rzimm_short(), decode_rzind16(), decode_subs(), H8300_ADD_4BIT, H8300_ADDB_DIRECT, H8300_ADDS, H8300_ADDW_DIRECT, H8300_ADDX, H8300_ADDX_4BIT, H8300_AND, H8300_AND_4BIT, H8300_ANDC, H8300_BAND_BIAND, H8300_BCC, H8300_BCLR_IMM2R8, H8300_BCLR_R2ABS8, H8300_BCLR_R2IND16, H8300_BCLR_R2R8, H8300_BCS, H8300_BEQ, H8300_BGE, H8300_BGT, H8300_BHI, H8300_BIAND_IMM2ABS8, H8300_BIAND_IMM2IND16, H8300_BILD_IMM2R8, H8300_BLE, H8300_BLS, H8300_BLT, H8300_BMI, H8300_BNE, H8300_BNOT_1, H8300_BNOT_2, H8300_BOR_BIOR, H8300_BPL, H8300_BRA, H8300_BRN, H8300_BSET_1, H8300_BSET_2, H8300_BSR, H8300_BST_BIST, H8300_BTST, H8300_BTST_R2R8, H8300_BVC, H8300_BVS, H8300_BXOR_BIXOR, H8300_CMP_1, H8300_CMP_2, H8300_CMP_4BIT, H8300_DAA, H8300_DAS, H8300_DEC, H8300_DIVXU, H8300_EEPMOV, H8300_INC, H8300_JMP_1, H8300_JMP_2, H8300_JMP_3, H8300_JSR_1, H8300_JSR_2, H8300_JSR_3, H8300_LDC, H8300_LDC_2, H8300_MOV_1, H8300_MOV_2, H8300_MOV_4BIT, H8300_MOV_4BIT_2, H8300_MOV_4BIT_3, H8300_MOV_ABS162R16, H8300_MOV_DISP162R16, H8300_MOV_IMM162R16, H8300_MOV_IND162R16, H8300_MOV_INDINC162R16, H8300_MOV_R82ABS16, H8300_MOV_R82DISPR16, H8300_MOV_R82IND16, H8300_MOV_R82RDEC16, H8300_MULXU, H8300_NOP, H8300_NOT_NEG, H8300_OR, H8300_OR_4BIT, H8300_ORC, H8300_ROTL, H8300_ROTR, H8300_RTE, H8300_RTS, H8300_SHL, H8300_SHR, H8300_SLEEP, H8300_STC, H8300_SUB_1, H8300_SUBS, H8300_SUBW, H8300_SUBX, H8300_SUBX_4BIT, H8300_XOR, H8300_XOR_4BIT, and H8300_XORC.

Referenced by disassemble(), and h8300_op().