lcd-m6sp.c: remove \r
[kugel-rb.git] / apps / plugins / zxbox / z80_op1x.c
blobca9b001486dcc01116622ffdaf193a89ce8af9f0
1 /*
2 * Copyright (C) 1996-1998 Szeredi Miklos
3 * Email: mszeredi@inf.bme.hu
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.
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.
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.
21 /* IX */
23 LD_RR_NN(ix, IX, 2)
25 ADD_RR_RR(ix, IX, bc, BC, 0)
26 ADD_RR_RR(ix, IX, de, DE, 1)
27 ADD_RR_RR(ix, IX, ix, IX, 2)
28 ADD_RR_RR(ix, IX, sp, SP, 3)
30 INC_RR(ix, IX, 2)
32 DEC_RR(ix, IX, 2)
34 LD_INN_RR(ix, IX)
36 LD_RR_INN(ix, IX)
38 INC_R(ixh, XH, 4)
39 INC_R(ixl, XL, 5)
41 OPDEF(inc_iixd, 0x34)
43 register dbyte addr;
44 IXDGET(IX, addr);
45 MODMEMADDR(INC, addr);
46 ENTIME(19);
49 DEC_R(ixh, XH, 4)
50 DEC_R(ixl, XL, 5)
52 OPDEF(dec_iixd, 0x35)
54 register dbyte addr;
55 IXDGET(IX, addr);
56 MODMEMADDR(DEC, addr);
57 ENTIME(19);
61 LD_R_N(ixh, XH, 4)
62 LD_R_N(ixl, XL, 5)
64 OPDEF(ld_iixd_n, 0x36)
66 register dbyte addr;
67 IXDGET(IX, addr);
68 WRITE(addr, READ(PC));
69 PC++;
70 ENTIME(15);
74 /* IY */
76 LD_RR_NN(iy, IY, 2)
78 ADD_RR_RR(iy, IY, bc, BC, 0)
79 ADD_RR_RR(iy, IY, de, DE, 1)
80 ADD_RR_RR(iy, IY, iy, IY, 2)
81 ADD_RR_RR(iy, IY, sp, SP, 3)
83 INC_RR(iy, IY, 2)
85 DEC_RR(iy, IY, 2)
87 LD_INN_RR(iy, IY)
89 LD_RR_INN(iy, IY)
91 INC_R(iyh, YH, 4)
92 INC_R(iyl, YL, 5)
94 OPDEF(inc_iiyd, 0x34)
96 register dbyte addr;
97 IXDGET(IY, addr);
98 MODMEMADDR(INC, addr);
99 ENTIME(19);
102 DEC_R(iyh, YH, 4)
103 DEC_R(iyl, YL, 5)
105 OPDEF(dec_iiyd, 0x35)
107 register dbyte addr;
108 IXDGET(IY, addr);
109 MODMEMADDR(DEC, addr);
110 ENTIME(19);
114 LD_R_N(iyh, YH, 4)
115 LD_R_N(iyl, YL, 5)
117 OPDEF(ld_iiyd_n, 0x36)
119 register dbyte addr;
120 IXDGET(IY, addr);
121 WRITE(addr, READ(PC));
122 PC++;
123 ENTIME(15);