diff options
Diffstat (limited to 'apps/plugins/zxbox/z80_op3x.c')
-rw-r--r-- | apps/plugins/zxbox/z80_op3x.c | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/apps/plugins/zxbox/z80_op3x.c b/apps/plugins/zxbox/z80_op3x.c new file mode 100644 index 0000000000..cafb5dfdad --- /dev/null +++ b/apps/plugins/zxbox/z80_op3x.c | |||
@@ -0,0 +1,89 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1996-1998 Szeredi Miklos | ||
3 | * Email: mszeredi@inf.bme.hu | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. See the file COPYING. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
18 | * | ||
19 | */ | ||
20 | |||
21 | /* IX */ | ||
22 | |||
23 | ADD_A_R(ixh, XH, 4) | ||
24 | ADD_A_R(ixl, XL, 5) | ||
25 | |||
26 | ADC_A_R(ixh, XH, 4) | ||
27 | ADC_A_R(ixl, XL, 5) | ||
28 | |||
29 | SUB_R(ixh, XH, 4) | ||
30 | SUB_R(ixl, XL, 5) | ||
31 | |||
32 | SBC_A_R(ixh, XH, 4) | ||
33 | SBC_A_R(ixl, XL, 5) | ||
34 | |||
35 | AND_R(ixh, XH, 4) | ||
36 | AND_R(ixl, XL, 5) | ||
37 | |||
38 | XOR_R(ixh, XH, 4) | ||
39 | XOR_R(ixl, XL, 5) | ||
40 | |||
41 | OR_R(ixh, XH, 4) | ||
42 | OR_R(ixl, XL, 5) | ||
43 | |||
44 | CP_R(ixh, XH, 4) | ||
45 | CP_R(ixl, XL, 5) | ||
46 | |||
47 | ARIID(add_a, ADD, 0, ix, IX) | ||
48 | ARIID(adc_a, ADC, 1, ix, IX) | ||
49 | ARIID(sub, SUB, 2, ix, IX) | ||
50 | ARIID(sbc_a, SBC, 3, ix, IX) | ||
51 | ARIID(and, AND, 4, ix, IX) | ||
52 | ARIID(xor, XOR, 5, ix, IX) | ||
53 | ARIID(or, OR, 6, ix, IX) | ||
54 | ARIID(cp, CP, 7, ix, IX) | ||
55 | |||
56 | /* IY */ | ||
57 | |||
58 | ADD_A_R(iyh, YH, 4) | ||
59 | ADD_A_R(iyl, YL, 5) | ||
60 | |||
61 | ADC_A_R(iyh, YH, 4) | ||
62 | ADC_A_R(iyl, YL, 5) | ||
63 | |||
64 | SUB_R(iyh, YH, 4) | ||
65 | SUB_R(iyl, YL, 5) | ||
66 | |||
67 | SBC_A_R(iyh, YH, 4) | ||
68 | SBC_A_R(iyl, YL, 5) | ||
69 | |||
70 | AND_R(iyh, YH, 4) | ||
71 | AND_R(iyl, YL, 5) | ||
72 | |||
73 | XOR_R(iyh, YH, 4) | ||
74 | XOR_R(iyl, YL, 5) | ||
75 | |||
76 | OR_R(iyh, YH, 4) | ||
77 | OR_R(iyl, YL, 5) | ||
78 | |||
79 | CP_R(iyh, YH, 4) | ||
80 | CP_R(iyl, YL, 5) | ||
81 | |||
82 | ARIID(add_a, ADD, 0, iy, IY) | ||
83 | ARIID(adc_a, ADC, 1, iy, IY) | ||
84 | ARIID(sub, SUB, 2, iy, IY) | ||
85 | ARIID(sbc_a, SBC, 3, iy, IY) | ||
86 | ARIID(and, AND, 4, iy, IY) | ||
87 | ARIID(xor, XOR, 5, iy, IY) | ||
88 | ARIID(or, OR, 6, iy, IY) | ||
89 | ARIID(cp, CP, 7, iy, IY) | ||