summaryrefslogtreecommitdiff
path: root/disasm.h
blob: 6164d94cc1114f8798989108737373cc37163ab7 (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
static const char *opname[0x100] = {
	[CPS_IMP ] = "CPS",
	[ADC_IMM ] = "ADC #",
	[AAB_IMP ] = "AAB",
	[ADC_AB  ] = "ADC a",
	[LDA_IN  ] = "LDA ind",
	[ADC_Z   ] = "ADC zm",
	[CLC_IMP ] = "CLC",
	[DEX_IMP ] = "DEX",
	[DEC_IMP ] = "DEC",
	[DEC_AB  ] = "DEC a",
	[DEC_Z   ] = "DEC zm",
	[JMP_AB  ] = "JMP a",
	[SBC_IMM ] = "SBC #",
	[SAB_IMP ] = "SAB",
	[SBC_AB  ] = "SBC a",
	[STA_IN  ] = "STA ind",
	[SBC_Z   ] = "SBC zm",
	[SEC_IMP ] = "SEC",
	[INX_IMP ] = "INX",
	[INC_IMP ] = "INC",
	[INC_AB  ] = "INC a",
	[INC_Z   ] = "INC zm",
	[JSR_AB  ] = "JSR a",
	[AND_IMM ] = "AND #",
	[ABA_IMP ] = "ABA",
	[AND_AB  ] = "AND a",
	[CMP_IN  ] = "CMP ind",
	[AND_Z   ] = "AND zm",
	[CLI_IMP ] = "CLI",
	[DEY_IMP ] = "DEY",
	[CPB_IMM ] = "CPB #",
	[CPB_AB  ] = "CPB a",
	[CPB_Z   ] = "CPB zm",
	[JMP_Z   ] = "JMP zm",
	[ORA_IMM ] = "ORA #",
	[OAB_IMP ] = "OAB",
	[ORA_AB  ] = "ORA a",
	[LDB_IN  ] = "LDB ind",
	[ORA_Z   ] = "ORA zm",
	[SEI_IMP ] = "SEI",
	[INY_IMP ] = "INY",
	[CPX_IMM ] = "CPX #",
	[CPX_AB  ] = "CPX a",
	[CPY_Z   ] = "CPY zm",
	[JSR_Z   ] = "JSR zm",
	[XOR_IMM ] = "XOR #",
	[XAB_IMP ] = "XAB",
	[XOR_AB  ] = "XOR a",
	[STB_IN  ] = "STB ind",
	[XOR_Z   ] = "XOR zm",
	[CLV_IMP ] = "CLV",
	[CPY_IMM ] = "CPY #",
	[CPY_AB  ] = "CPY a",
	[CPX_Z   ] = "CPX zm",
	[BPO_REL ] = "BPO rel",
	[LSL_IMM ] = "LSL #",
	[LLB_IMP ] = "LLB",
	[LSL_AB  ] = "LSL a",
	[CPB_IN  ] = "CPB ind",
	[LSL_Z   ] = "LSL zm",
	[WAI_IMP ] = "WAI",
	[PHP_IMP ] = "PHP",
	[TAB_IMP ] = "TAB",
	[LDA_IY  ] = "LDA indy",
	[LDA_IX  ] = "LDA indx",
	[BNG_REL ] = "BNG rel",
	[LSR_IMM ] = "LSR #",
	[LRB_IMP ] = "LRB",
	[LSR_AB  ] = "LSR a",
	[LDY_IN  ] = "LDY ind",
	[LSR_Z   ] = "LSR zm",
	[BRK_IMP ] = "BRK",
	[PLP_IMP ] = "PLP",
	[TBA_IMP ] = "TBA",
	[STA_IY  ] = "STA indy",
	[STA_IX  ] = "STA indx",
	[BCS_REL ] = "BCS rel",
	[ROL_IMM ] = "ROL #",
	[RLB_IMP ] = "RLB",
	[ROL_AB  ] = "ROL a",
	[STY_IN  ] = "STY ind",
	[ROL_Z   ] = "ROL zm",
	[LDA_ZY  ] = "LDA zmy",
	[PHA_IMP ] = "PHA",
	[TAY_IMP ] = "TAY",
	[CMP_IY  ] = "CMP indy",
	[CMP_IX  ] = "CMP indx",
	[BCC_REL ] = "BCC rel",
	[ROR_IMM ] = "ROR #",
	[RRB_IMP ] = "RRB",
	[ROR_AB  ] = "ROR a",
	[LDX_IN  ] = "LDX ind",
	[ROR_Z   ] = "ROR zm",
	[STA_ZY  ] = "STA zmy",
	[PLA_IMP ] = "PLA",
	[TYA_IMP ] = "TYA",
	[LDB_IY  ] = "LDB indy",
	[LDB_IX  ] = "LDB indx",
	[BEQ_REL ] = "BEQ rel",
	[MUL_IMM ] = "MUL #",
	[MAB_IMP ] = "MAB",
	[MUL_AB  ] = "MUL a",
	[STX_IN  ] = "STX ind",
	[MUL_Z   ] = "MUL zm",
	[LDB_ZY  ] = "LDB zmy",
	[PHB_IMP ] = "PHB",
	[TAX_IMP ] = "TAX",
	[STB_IY  ] = "STB indy",
	[STB_IX  ] = "STB indx",
	[BNE_REL ] = "BNE rel",
	[DIV_IMM ] = "DIV #",
	[DAB_IMP ] = "DAB",
	[DIV_AB  ] = "DIV a",
	[JSR_IN  ] = "JSR ind",
	[DIV_Z   ] = "DIV zm",
	[STB_ZY  ] = "STB zmy",
	[PLB_IMP ] = "PLB",
	[TXA_IMP ] = "TXA",
	[CPB_IY  ] = "CPB indy",
	[CPB_IX  ] = "CPB indx",
	[BVS_REL ] = "BVS rel",
	[CMP_IMM ] = "CMP #",
	[CAB_IMP ] = "CAB",
	[CMP_AB  ] = "CMP a",
	[JMP_IN  ] = "JMP ind",
	[CMP_Z   ] = "CMP zm",
	[LDA_ZX  ] = "LDA zmx",
	[LDX_IMM ] = "LDX #",
	[TYX_IMP ] = "TYX",
	[LDX_AB  ] = "LDX a",
	[LDX_Z   ] = "LDX zm",
	[BVC_REL ] = "BVC rel",
	[LDA_IMM ] = "LDA #",
	[DEB_IMP ] = "DEB",
	[LDA_AB  ] = "LDA a",
	[LDA_Z   ] = "LDA zm",
	[STA_ZX  ] = "STA zmx",
	[PHY_IMP ] = "PHY",
	[TXY_IMP ] = "TXY",
	[STA_AB  ] = "STA a",
	[STA_Z   ] = "STA zm",
	[BRA_REL ] = "BRA rel",
	[LDB_IMM ] = "LDB #",
	[INB_IMP ] = "INB",
	[LDB_AB  ] = "LDB a",
	[LDB_Z   ] = "LDB zm",
	[LDB_ZX  ] = "LDB zmx",
	[PLY_IMP ] = "PLY",
	[TSX_IMP ] = "TSX",
	[STB_AB  ] = "STB a",
	[STB_Z   ] = "STB zm",
	[RTS_IMP ] = "RTS",
	[LDY_IMM ] = "LDY #",
	[LDY_AB  ] = "LDY a",
	[LDY_Z   ] = "LDY zm",
	[STB_ZX  ] = "STB zmx",
	[PHX_IMP ] = "PHX",
	[NOP_IMP ] = "NOP",
	[STY_AB  ] = "STY a",
	[STY_Z   ] = "STY zm",
	[RTI_IMP ] = "RTI",
	[ASR_IMM ] = "ASR #",
	[ARB_IMP ] = "ARB",
	[ASR_AB  ] = "ASR a",
	[ASR_Z   ] = "ASR zm",
	[PLX_IMP ] = "PLX",
	[TXS_IMM ] = "TXS #",
	[STX_AB  ] = "STX a",
	[STX_Z   ] = "STX zm"
};