# OPCODES, TSTATES and INSTRUCTIONS for not prefixed instructions
# some syntax have been modified (like JP (HL) to JP HL, or Carry
# condition from C to CF) to simplify the parser
00	4	NOP
01	10	LD BC,nn
02	7	LD (BC),A
03	6	INC BC
04	4	INC B
05	4	DEC B
06	7	LD B,n
07	4	RLCA
08	4	EX AF,AF'
09	11	ADD HL,BC
0A	7	LD A,(BC)
0B	6	DEC BC
0C	4	INC C
0D	4	DEC C
0E	7	LD C,n
0F	4	RRCA
10	13/8	DJNZ n
11	10	LD DE,nn
12	7	LD (DE),A
13	6	INC DE
14	4	INC D
15	4	DEC D
16	7	LD D,n
17	4	RLA
18	12	JR n
19	11	ADD HL,DE
1A	7	LD A,(DE)
1B	6	DEC DE
1C	4	INC E
1D	4	DEC E
1E	7	LD E,n
1F	4	RRA
20	12/7	JR NZ,n
21	10	LD HL,nn
22	16	LD (nn),HL
23	6	INC HL
24	4	INC H
25	4	DEC H
26	7	LD H,n
27	4	DAA
28	12/7	JR Z,n
29	11	ADD HL,HL
2A	16	LD HL,(nn)
2B	6	DEC HL
2C	4	INC L
2D	4	DEC L
2E	7	LD L,n
2F	4	CPL
30	12/7	JR NC,n
31	10	LD SP,nn
32	13	LD (nn),A
33	6	INC SP
34	11	INC b(HL)
35	11	DEC b(HL)
36	10	LD (HL),n
37	4	SCF
38	12/7	JR CF,n
39	11	ADD HL,SP
3A	13	LD A,(nn)
3B	6	DEC SP
3C	4	INC A
3D	4	DEC A
3E	7	LD A,n
3F	4	CCF
40	4	LD B,B
41	4	LD B,C
42	4	LD B,D
43	4	LD B,E
44	4	LD B,H
45	4	LD B,L
46	7	LD B,(HL)
47	4	LD B,A
48	4	LD C,B
49	4	LD C,C
4A	4	LD C,D
4B	4	LD C,E
4C	4	LD C,H
4D	4	LD C,L
4E	7	LD C,(HL)
4F	4	LD C,A
50	4	LD D,B
51	4	LD D,C
52	4	LD D,D
53	4	LD D,E
54	4	LD D,H
55	4	LD D,L
56	7	LD D,(HL)
57	4	LD D,A
58	4	LD E,B
59	4	LD E,C
5A	4	LD E,D
5B	4	LD E,E
5C	4	LD E,H
5D	4	LD E,L
5E	7	LD E,(HL)
5F	4	LD E,A
60	4	LD H,B
61	4	LD H,C
62	4	LD H,D
63	4	LD H,E
64	4	LD H,H
65	4	LD H,L
66	7	LD H,(HL)
67	4	LD H,A
68	4	LD L,B
69	4	LD L,C
6A	4	LD L,D
6B	4	LD L,E
6C	4	LD L,H
6D	4	LD L,L
6E	7	LD L,(HL)
6F	4	LD L,A
70	7	LD (HL),B
71	7	LD (HL),C
72	7	LD (HL),D
73	7	LD (HL),E
74	7	LD (HL),H
75	7	LD (HL),L
76	4	HALT
77	7	LD (HL),A
78	4	LD A,B
79	4	LD A,C
7A	4	LD A,D
7B	4	LD A,E
7C	4	LD A,H
7D	4	LD A,L
7E	7	LD A,(HL)
7F	4	LD A,A
80	4	ADD A,B
81	4	ADD A,C
82	4	ADD A,D
83	4	ADD A,E
84	4	ADD A,H
85	4	ADD A,L
86	7	ADD A,(HL)
87	4	ADD A,A
88	4	ADC A,B
89	4	ADC A,C
8A	4	ADC A,D
8B	4	ADC A,E
8C	4	ADC A,H
8D	4	ADC A,L
8E	7	ADC A,(HL)
8F	4	ADC A,A
90	4	SUB B
91	4	SUB C
92	4	SUB D
93	4	SUB E
94	4	SUB H
95	4	SUB L
96	7	SUB b(HL)
97	4	SUB A
98	4	SBC A,B
99	4	SBC A,C
9A	4	SBC A,D
9B	4	SBC A,E
9C	4	SBC A,H
9D	4	SBC A,L
9E	7	SBC A,(HL)
9F	4	SBC A,A
A0	4	AND B
A1	4	AND C
A2	4	AND D
A3	4	AND E
A4	4	AND H
A5	4	AND L
A6	7	AND b(HL)
A7	4	AND A
A8	4	XOR B
A9	4	XOR C
AA	4	XOR D
AB	4	XOR E
AC	4	XOR H
AD	4	XOR L
AE	7	XOR b(HL)
AF	4	XOR A
B0	4	OR B
B1	4	OR C
B2	4	OR D
B3	4	OR E
B4	4	OR H
B5	4	OR L
B6	7	OR b(HL)
B7	4	OR A
B8	4	CP B
B9	4	CP C
BA	4	CP D
BB	4	CP E
BC	4	CP H
BD	4	CP L
BE	7	CP b(HL)
BF	4	CP A
C0	11/5	RET NZ
C1	10	POP BC
C2	10	JP NZ,nn
C3	10	JP nn
C4	17/10	CALL NZ,nn
C5	11	PUSH BC
C6	7	ADD A,n
C7	11	RST 0H
C8	11/5	RET Z
C9	10	RET
CA	10	JP Z,nn
CB	*	PREFIX
CC	17/10	CALL Z,nn
CD	17	CALL nn
CE	7	ADC A,n
CF	11	RST 8H
D0	11/5	RET NC
D1	10	POP DE
D2	10	JP NC,nn
D3	11	OUT n,A
D4	17/10	CALL NC,nn
D5	11	PUSH DE
D6	7	SUB n
D7	11	RST 10H
D8	11/5	RET CF
D9	4	EXX
DA	10	JP CF,nn
DB	11	IN A,n
DC	17/10	CALL CF,nn
DD	*	PREFIX
DE	7	SBC A,n
DF	11	RST 18H
E0	11/5	RET PO
E1	10	POP HL
E2	10	JP PO,nn
E3	19	EX (SP),HL
E4	17/10	CALL PO,nn
E5	11	PUSH HL
E6	7	AND n
E7	11	RST 20H
E8	11/5	RET PE
E9	4	JP HL
EA	10	JP PE,nn
EB	4	EX DE,HL
EC	17/10	CALL PE,nn
ED	*	PREFIX
EE	7	XOR n
EF	11	RST 28H
F0	11/5	RET P
F1	10	POP AF
F2	10	JP P,nn
F3	4	DI
F4	17/10	CALL P,nn
F5	11	PUSH AF
F6	7	OR n
F7	11	RST 30H
F8	11/5	RET M
F9	6	LD SP,HL
FA	10	JP M,nn
FB	4	EI
FC	17/10	CALL M,nn
FD	*	PREFIX
FE	7	CP n
FF	11	RST 38H
