summaryrefslogtreecommitdiff
path: root/apps/plugins/zxbox/z80_op3x.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/zxbox/z80_op3x.c')
-rw-r--r--apps/plugins/zxbox/z80_op3x.c89
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
23ADD_A_R(ixh, XH, 4)
24ADD_A_R(ixl, XL, 5)
25
26ADC_A_R(ixh, XH, 4)
27ADC_A_R(ixl, XL, 5)
28
29SUB_R(ixh, XH, 4)
30SUB_R(ixl, XL, 5)
31
32SBC_A_R(ixh, XH, 4)
33SBC_A_R(ixl, XL, 5)
34
35AND_R(ixh, XH, 4)
36AND_R(ixl, XL, 5)
37
38XOR_R(ixh, XH, 4)
39XOR_R(ixl, XL, 5)
40
41OR_R(ixh, XH, 4)
42OR_R(ixl, XL, 5)
43
44CP_R(ixh, XH, 4)
45CP_R(ixl, XL, 5)
46
47ARIID(add_a, ADD, 0, ix, IX)
48ARIID(adc_a, ADC, 1, ix, IX)
49ARIID(sub, SUB, 2, ix, IX)
50ARIID(sbc_a, SBC, 3, ix, IX)
51ARIID(and, AND, 4, ix, IX)
52ARIID(xor, XOR, 5, ix, IX)
53ARIID(or, OR, 6, ix, IX)
54ARIID(cp, CP, 7, ix, IX)
55
56/* IY */
57
58ADD_A_R(iyh, YH, 4)
59ADD_A_R(iyl, YL, 5)
60
61ADC_A_R(iyh, YH, 4)
62ADC_A_R(iyl, YL, 5)
63
64SUB_R(iyh, YH, 4)
65SUB_R(iyl, YL, 5)
66
67SBC_A_R(iyh, YH, 4)
68SBC_A_R(iyl, YL, 5)
69
70AND_R(iyh, YH, 4)
71AND_R(iyl, YL, 5)
72
73XOR_R(iyh, YH, 4)
74XOR_R(iyl, YL, 5)
75
76OR_R(iyh, YH, 4)
77OR_R(iyl, YL, 5)
78
79CP_R(iyh, YH, 4)
80CP_R(iyl, YL, 5)
81
82ARIID(add_a, ADD, 0, iy, IY)
83ARIID(adc_a, ADC, 1, iy, IY)
84ARIID(sub, SUB, 2, iy, IY)
85ARIID(sbc_a, SBC, 3, iy, IY)
86ARIID(and, AND, 4, iy, IY)
87ARIID(xor, XOR, 5, iy, IY)
88ARIID(or, OR, 6, iy, IY)
89ARIID(cp, CP, 7, iy, IY)