-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmsp430x_disas.h
65 lines (59 loc) · 1.06 KB
/
msp430x_disas.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef MSP430X_DISAS_H
#define MSP430X_DISAS_H
#define MSP430_INSTR_MAXLEN 32
enum msp430_addressing {
MSP430_ADDR_DIRECT,
MSP430_ADDR_INDEXED,
MSP430_ADDR_INDIRECT,
MSP430_ADDR_INDIRECT_POST_INC,
MSP430_ADDR_AUTO,
MSP430_ADDR_REPEAT,
MSP430_ADDR_IMM,
MSP430_ADDR_ABS,
MSP430_ADDR_IMM20,
MSP430_ADDR_ABS20,
MSP430_ADDR_CG1,
MSP430_ADDR_CG2,
MSP430_ADDR_JUMP,
MSP430_ADDR_ONEOP,
MSP430_ADDR_PUSHPOP,
MSP430_ADDR_POPM,
MSP430_ADDR_NONE,
};
enum msp430_cmd_type {
MSP430_ONEOP,
MSP430_TWOOP,
MSP430_JUMP,
MSP430_X,
};
enum msp430_registers {
MSP430_PC,
MSP430_SP,
MSP430_SR,
MSP430_R3,
MSP430_R4,
MSP430_R5,
MSP430_R6,
MSP430_R7,
MSP430_R8,
MSP430_R9,
MSP430_R10,
MSP430_R11,
MSP430_R12,
MSP430_R13,
MSP430_R14,
MSP430_R15,
};
struct msp430_cmd {
ut8 type;
ut16 opcode;
st32 jmp_addr;
ut16 call_addr;
ut32 ptr_addr;
ut8 jmp_cond;
char instr[MSP430_INSTR_MAXLEN];
char operands[MSP430_INSTR_MAXLEN];
char prefix[MSP430_INSTR_MAXLEN];
};
int msp430x_decode_command (const ut8 *instr, struct msp430_cmd *cmd);
#endif /* MSP430X_DISAS_H */