-
Notifications
You must be signed in to change notification settings - Fork 0
/
jump.go
110 lines (98 loc) · 1.33 KB
/
jump.go
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
package opcode
var jump = []*OPCode{
{
N: "JP nn",
C: []Code{
{0xc3, 0x00, nil},
{0x00, 0xff, nil},
{0x00, 0xff, nil},
},
T: []int{4, 3, 3},
},
{
N: "JP cc, nn",
C: []Code{
{0xc2, 0x38, vCC3_3},
{0x00, 0xff, nil},
{0x00, 0xff, nil},
},
T: []int{4, 3, 4, 3, 3},
T2: []int{4, 3, 3},
},
{
N: "JR e",
C: []Code{
{0x18, 0x00, nil},
{0x00, 0xff, nil},
},
T: []int{4, 3, 5},
},
{
N: "JR C, e",
C: []Code{
{0x38, 0x00, nil},
{0x00, 0xff, nil},
},
T: []int{4, 3, 5},
T2: []int{4, 3},
},
{
N: "JR NC, e",
C: []Code{
{0x30, 0x00, nil},
{0x00, 0xff, nil},
},
T: []int{4, 3, 5},
T2: []int{4, 3},
},
{
N: "JR Z, e",
C: []Code{
{0x28, 0x00, nil},
{0x00, 0xff, nil},
},
T: []int{4, 3, 5},
T2: []int{4, 3},
},
{
N: "JR NZ, e",
C: []Code{
{0x20, 0x00, nil},
{0x00, 0xff, nil},
},
T: []int{4, 3, 5},
T2: []int{4, 3},
},
{
N: "JP (HL)",
C: []Code{
{0xe9, 0x00, nil},
},
T: []int{4},
},
{
N: "JP (IX)",
C: []Code{
{0xdd, 0x00, nil},
{0xe9, 0x00, nil},
},
T: []int{4, 4},
},
{
N: "JP (IY)",
C: []Code{
{0xfd, 0x00, nil},
{0xe9, 0x00, nil},
},
T: []int{4, 4},
},
{
N: "DJNZ e",
C: []Code{
{0x10, 0x00, nil},
{0x00, 0xff, nil},
},
T: []int{5, 3, 5},
T2: []int{5, 3},
},
}