home *** CD-ROM | disk | FTP | other *** search
-
- /* Rotate.c: Z80 rotate and displacement instructions.
- *
- * Copyright 1996 Rui Fernando Ferreira Ribeiro.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
- #include "env.h"
-
- /*=========================================================================*
- * rlca *
- *=========================================================================*/
- /* ----------------
- | ---------- |
- CY <- | 7 <- 0 |<--
- ----------
- A
- */
- void rlca()
- {
- T(4);
- flags._H = flags._N = 0;
- A =(A<<1)| (UCHAR)(flags._C =(A>>7));
- flags._X = A & (UCHAR)BIT_5;
- flags._Y = A & (UCHAR)BIT_3;
- }
-
- /*=========================================================================*
- * rla *
- *=========================================================================*/
- /* -------------------------
- | ---------- |
- --- CY <- | 7 <- 0 |<--
- ----------
- A
- */
- void rla()
- {
- LOCAL UCHAR flagCcopy;
-
- T(4);
- flagCcopy = (flags._C != 0);
- flags._C = A & (UCHAR)BIT_7;
- A=((A<<1)|(flagCcopy));
- flags._H = flags._N = 0;
- flags._X = A & (UCHAR)BIT_5;
- flags._Y = A & (UCHAR)BIT_3;
- }
-
- /*=========================================================================*
- * rrca *
- *=========================================================================*/
- /* -----------------
- | --------- |
- --> | 7 -> 0 | ---> CY
- ---------
- A
- */
- void rrca()
- {
- T(4);
- flags._C = A & BIT_0;
- A = (A>>1) | (A<<7);
- flags._H = flags._N = 0;
- flags._X = A & (UCHAR)BIT_5;
- flags._Y = A & (UCHAR)BIT_3;
- }
-
- /*=========================================================================*
- * rra *
- *=========================================================================*/
- /* ---------------------
- | --------- |
- --> | 7 -> 0 | ---> CY
- ---------
- A
- */
- void rra()
- {
- LOCAL UCHAR flagCcopy;
-
- T(4);
- flagCcopy = flags._C?(UCHAR)BIT_7:0;
- flags._C = A & BIT_0;
- A=(A>>1)|flagCcopy;
- flags._H = flags._N = 0;
- flags._X = A & (UCHAR)BIT_5;
- flags._Y = A & (UCHAR)BIT_3;
- }
-
- /*=========================================================================*
- * rlc_r *
- *=========================================================================*/
- /* ----------------
- | ---------- |
- CY <- | 7 <- 0 |<--
- ----------
- r
- */
- #define rlc_r(r, TS) { \
- T(TS); \
- flags._H = flags._N = 0; \
- flags._Z = !((r)=((r)<<1)|(UCHAR)(flags._C=((r)>>7))); \
- flags._S = ((r) & (UCHAR)BIT_7); \
- flags._P = parity(r); \
- flags._X = (r) & (UCHAR)BIT_5; \
- flags._Y = (r) & (UCHAR)BIT_3; \
- }
-
- void rlc_b() rlc_r(B, 8);
- void rlc_c() rlc_r(C, 8);
- void rlc_d() rlc_r(D, 8);
- void rlc_e() rlc_r(E, 8);
- void rlc_h() rlc_r(H, 8);
- void rlc_Ix() rlc_r(HX, 15);
- void rlc_Iy() rlc_r(HY, 15);
- void rlc_l() rlc_r(L, 8);
- void rlc_iX() rlc_r(LX, 15);
- void rlc_iY() rlc_r(LY, 15);
- void rlc_a() rlc_r(A, 8);
-
- #undef rlc_r
-
- /*=========================================================================*
- * rlc_phl *
- *=========================================================================*/
- /* ----------------
- | ---------- |
- CY <- | 7 <- 0 |<--
- ----------
- (HL),(IX+d),(IY+d)
- */
- #define rlc_pss(ss, TS) \
- { \
- LOCAL USHORT tmp; \
- LOCAL UCHAR n; \
- \
- T(TS); \
- n = readbyte(tmp = ss); \
- flags._H = flags._N = 0; \
- flags._Z = !((n)=((n)<<1)|(UCHAR)(flags._C=((n)>>7))); \
- flags._S = (n & (UCHAR)BIT_7); \
- flags._P = parity(n); \
- writebyte(tmp, n); \
- flags._X = n & (UCHAR)BIT_5; \
- flags._Y = n & (UCHAR)BIT_3; \
- }
-
- void rlc_phl() rlc_pss(HL, 15);
- void rlc_pix() rlc_pss(pCBIX, 23);
- void rlc_piy() rlc_pss(pCBIY, 23);
-
- #undef rlc_pss
-
- /*=========================================================================*
- * rl_r *
- *=========================================================================*/
- /* -------------------------
- | ---------- |
- --- CY <- | 7 <- 0 |<--
- ----------
- r
- */
- #define rl_r(r, TS) { \
- LOCAL UCHAR flagCcopy; \
- \
- T(TS); \
- flags._H = flags._N = 0; \
- flagCcopy = (flags._C != 0); \
- flags._C = ((r) & (UCHAR)BIT_7); \
- flags._S = (((r) = (((r) << (UCHAR)1) | flagCcopy)) & (UCHAR)BIT_7); \
- flags._Z = !(r); \
- flags._P = parity(r); \
- flags._X = (r) & (UCHAR)BIT_5; \
- flags._Y = (r) & (UCHAR)BIT_3; \
- }
-
-
- void rl_b() rl_r(B, 8);
- void rl_c() rl_r(C, 8);
- void rl_d() rl_r(D, 8);
- void rl_e() rl_r(E, 8);
- void rl_h() rl_r(H, 8);
- void rl_Ix() rl_r(HX, 15);
- void rl_Iy() rl_r(HY, 15);
- void rl_l() rl_r(L, 8);
- void rl_iX() rl_r(LX, 15);
- void rl_iY() rl_r(LY, 15);
- void rl_a() rl_r(A, 8);
-
- #undef rl_r
-
- /*=========================================================================*
- * rl_phl *
- *=========================================================================*/
- /* -------------------------
- | ---------- |
- --- CY <- | 7 <- 0 |<--
- ----------
- (HL),(IX+d),(IY+d)
- */
-
- #define rl_pss(ss, TS) \
- { \
- LOCAL UCHAR flagCcopy; \
- LOCAL USHORT tmp; \
- LOCAL UCHAR n; \
- \
- T(TS); \
- flags._H = flags._N = 0; \
- flagCcopy = (flags._C != 0); \
- flags._C = ((n = readbyte(tmp = ss)) & (UCHAR)BIT_7); \
- flags._S = ((n = (n << (UCHAR)1) | flagCcopy) & (UCHAR)BIT_7); \
- flags._Z = !n; \
- flags._P = parity(n); \
- writebyte(tmp, n); \
- flags._X = n & (UCHAR)BIT_5; \
- flags._Y = n & (UCHAR)BIT_3; \
- }
-
- void rl_phl() rl_pss(HL , 15);
- void rl_pix() rl_pss(pCBIX, 23);
- void rl_piy() rl_pss(pCBIY, 23);
-
- #undef rl_pss
-
- /*=========================================================================*
- * rrc_r *
- *=========================================================================*/
- /* -----------------
- | --------- |
- --> | 7 -> 0| ---> CY
- ---------
- r
- */
- #define rrc_r(r, TS) { \
- T(TS); \
- flags._H = flags._N = 0; \
- flags._S = flags._C = (r&1)?(USHORT)0x0080:0; \
- r = (r>>1) | flags._C; \
- flags._Z = !r; \
- flags._P = parity(r); \
- flags._X = (r) & (UCHAR)BIT_5; \
- flags._Y = (r) & (UCHAR)BIT_3; \
- }
-
-
- void rrc_b() rrc_r(B, 8);
- void rrc_c() rrc_r(C, 8);
- void rrc_d() rrc_r(D, 8);
- void rrc_e() rrc_r(E, 8);
- void rrc_h() rrc_r(H, 8);
- void rrc_Ix() rrc_r(HX, 15);
- void rrc_Iy() rrc_r(HY, 15);
- void rrc_l() rrc_r(L, 8);
- void rrc_iX() rrc_r(LX, 15);
- void rrc_iY() rrc_r(LY, 15);
- void rrc_a() rrc_r(A, 8);
-
- #undef rrc_r
-
- /*=========================================================================*
- * rrc_phl *
- *=========================================================================*/
- /* -----------------
- | --------- |
- --> | 7 -> 0| ---> CY
- ---------
- (HL),(IX+d),(IY+d)
- */
- #define rrc_pss(ss, TS) \
- { \
- LOCAL USHORT tmp; \
- LOCAL UCHAR n; \
- \
- T(TS); \
- flags._H = flags._N = 0; \
- n = readbyte(tmp = ss); \
- flags._S = flags._C = (n&1)?(USHORT)0x0080:0; \
- n = (n>>1) | flags._C; \
- flags._Z = !n; \
- flags._P = parity(n); \
- writebyte(tmp, n); \
- flags._X = n & (UCHAR)BIT_5; \
- flags._Y = n & (UCHAR)BIT_3; \
- }
-
- void rrc_phl() rrc_pss(HL, 15);
- void rrc_pix() rrc_pss(pCBIX, 23);
- void rrc_piy() rrc_pss(pCBIY, 23);
-
- #undef rrc_pss
-
- /*=========================================================================*
- * rr_r *
- *=========================================================================*/
- /* ---------------------
- | --------- |
- --> | 7 -> 0 | ---> CY
- ---------
- r
- */
- #define rr_r(r, TS) { \
- LOCAL UCHAR flagCcopy; \
- \
- T(TS); \
- flags._H = flags._N = 0; \
- flagCcopy = flags._C?(UCHAR)BIT_7:0; \
- flags._C = ((r) & (UCHAR)1); \
- flags._Z = !(r = (r >> 1) | flagCcopy); \
- flags._S = ((r) & (UCHAR)BIT_7); \
- flags._P = parity(r); \
- flags._X = (r) & (UCHAR)BIT_5; \
- flags._Y = (r) & (UCHAR)BIT_3; \
- }
-
- void rr_b() rr_r(B, 8);
- void rr_c() rr_r(C, 8);
- void rr_d() rr_r(D, 8);
- void rr_e() rr_r(E, 8);
- void rr_h() rr_r(H, 8);
- void rr_Ix() rr_r(HX, 15);
- void rr_Iy() rr_r(HY, 15);
- void rr_l() rr_r(L, 8);
- void rr_iX() rr_r(LX, 15);
- void rr_iY() rr_r(LY, 15);
- void rr_a() rr_r(A, 8);
-
- #undef rr_r
-
- /*=========================================================================*
- * rr_phl *
- *=========================================================================*/
- /* ---------------------
- | ---------- |
- --> | 7 -> 0 | ---> CY
- ----------
- (HL),(IX+d),(IY+d)
- */
- #define rr_pss(ss, TS) \
- { \
- LOCAL UCHAR flagCcopy; \
- LOCAL USHORT tmp; \
- LOCAL UCHAR n; \
- \
- T(TS); \
- flags._H = flags._N = 0; \
- flagCcopy = flags._C?(UCHAR)BIT_7:0; \
- flags._C = ((n = readbyte(tmp = ss)) & (UCHAR)1); \
- flags._Z = !(n = (n >> (UCHAR)1) | flagCcopy); \
- flags._S = (n & (UCHAR)BIT_7); \
- flags._P = parity(n); \
- writebyte(tmp, n); \
- flags._X = n & (UCHAR)BIT_5; \
- flags._Y = n & (UCHAR)BIT_3; \
- }
-
- void rr_phl() rr_pss(HL, 15);
- void rr_pix() rr_pss(pCBIX, 23);
- void rr_piy() rr_pss(pCBIY, 23);
-
- #undef rr_pss
-
- /*=========================================================================*
- * sla_r *
- *=========================================================================*/
- /*
- ----------
- CY <- | 7 <- 0 |<-- 0
- ----------
- A
- */
-
- #define sla_r(r, TS) { \
- T(TS); \
- flags._H = flags._N = 0; \
- flags._C = ((r) & (UCHAR)BIT_7); \
- flags._Z = !((r) = ((r) << (UCHAR)1) ); \
- flags._S = ((r) & (UCHAR)BIT_7); \
- flags._P = parity(r); \
- flags._X = (r) & (UCHAR)BIT_5; \
- flags._Y = (r) & (UCHAR)BIT_3; \
- }
-
- void sla_b() sla_r(B, 8);
- void sla_c() sla_r(C, 8);
- void sla_d() sla_r(D, 8);
- void sla_e() sla_r(E, 8);
- void sla_h() sla_r(H, 8);
- void sla_Ix() sla_r(HX, 15);
- void sla_Iy() sla_r(HY, 15);
- void sla_l() sla_r(L, 8);
- void sla_iX() sla_r(LX, 15);
- void sla_iY() sla_r(LY, 15);
- void sla_a() sla_r(A, 8);
-
- #undef sla_r
-
- /*=========================================================================*
- * sla_phl *
- *=========================================================================*/
- /*
- ----------
- CY <- | 7 <- 0 |<-- 0
- ----------
- (HL),(IX+d),(IY+d)
- */
- #define sla_pss(ss, TS) \
- { \
- LOCAL USHORT tmp; \
- LOCAL UCHAR n; \
- \
- T(TS); \
- flags._H = flags._N = 0; \
- flags._C = ((n = readbyte(tmp = ss)) & (UCHAR)BIT_7); \
- flags._Z = !(n <<= (UCHAR)1); \
- flags._S = (n & (UCHAR)BIT_7); \
- flags._P = parity(n); \
- writebyte(tmp, n); \
- flags._X = n & (UCHAR)BIT_5; \
- flags._Y = n & (UCHAR)BIT_3; \
- }
-
- void sla_phl() sla_pss(HL, 15);
- void sla_pix() sla_pss(pCBIX, 23);
- void sla_piy() sla_pss(pCBIY, 23);
-
- #undef sla_pss
-
- /*=========================================================================*
- * sll_r *
- *=========================================================================*/
- /*
- ----------
- CY <- | 7 <- 0 |<-- 1
- ----------
- A
- */
-
- #define sll_r(r, TS) { \
- T(TS); \
- flags._H = flags._N = 0; \
- flags._C = ((r) & (UCHAR)BIT_7); \
- flags._Z = !((r) = (((r) << (UCHAR)1) | (UCHAR)1) ); \
- flags._S = ((r) & (UCHAR)BIT_7); \
- flags._P = parity(r); \
- flags._X = (r) & (UCHAR)BIT_5; \
- flags._Y = (r) & (UCHAR)BIT_3; \
- }
-
- void sll_b() sll_r(B, 8);
- void sll_c() sll_r(C, 8);
- void sll_d() sll_r(D, 8);
- void sll_e() sll_r(E, 8);
- void sll_h() sll_r(H, 8);
- void sll_Ix() sll_r(HX, 15);
- void sll_Iy() sll_r(HY, 15);
- void sll_l() sll_r(L, 8);
- void sll_iX() sll_r(LX, 15);
- void sll_iY() sll_r(LY, 15);
- void sll_a() sll_r(A, 8);
-
- #undef sll_r
-
- /*=========================================================================*
- * sll_phl *
- *=========================================================================*/
- /*
- ----------
- CY <- | 7 <- 0 |<-- 1
- ----------
- (HL),(IX+d),(IY+d)
- */
- #define sll_pss(ss, TS) \
- { \
- LOCAL USHORT tmp; \
- LOCAL UCHAR n; \
- \
- T(TS); \
- flags._H = flags._N = 0; \
- flags._C = ((n = readbyte(tmp = ss)) & (UCHAR)BIT_7); \
- flags._Z = !(n = ((n << (UCHAR)1) | 1)); \
- flags._S = (n & (UCHAR)BIT_7); \
- flags._P = parity(n); \
- writebyte(tmp, n); \
- flags._X = n & (UCHAR)BIT_5; \
- flags._Y = n & (UCHAR)BIT_3; \
- }
-
- void sll_phl() sll_pss(HL, 15);
- void sll_pix() sll_pss(pCBIX, 23);
- void sll_piy() sll_pss(pCBIY, 23);
-
- #undef sll_pss
-
- /*=========================================================================*
- * sra_r *
- *=========================================================================*/
- /*
- ----------
- -- | 7 -> 0 | ---> CY
- | ----------
- | | r
- ->---
- */
- #define sra_r(r, TS) { \
- T(TS); \
- flags._H = flags._N = 0; \
- flags._C = (r) & (UCHAR)1; \
- flags._Z = !((r) = ((r) & (UCHAR)BIT_7) | ((r) >> (UCHAR)1)); \
- flags._S = ((r) & (UCHAR)BIT_7); \
- flags._P = parity(r); \
- flags._X = (r) & (UCHAR)BIT_5; \
- flags._Y = (r) & (UCHAR)BIT_3; \
- }
-
-
- void sra_b() sra_r(B, 8);
- void sra_c() sra_r(C, 8);
- void sra_d() sra_r(D, 8);
- void sra_e() sra_r(E, 8);
- void sra_h() sra_r(H, 8);
- void sra_Ix() sra_r(HX, 15);
- void sra_Iy() sra_r(HY, 15);
- void sra_l() sra_r(L, 8);
- void sra_iX() sra_r(LX, 15);
- void sra_iY() sra_r(LY, 15);
- void sra_a() sra_r(A, 8);
-
- #undef sra_r
-
- /*=========================================================================*
- * sra_phl *
- *=========================================================================*/
- /*
- ----------
- -- | 7 -> 0 | ---> CY
- | ----------
- | ^ (HL),(IX+d),(IY+d)
- | |
- ->---
- */
- #define sra_pss(ss, TS) \
- { \
- LOCAL USHORT tmp; \
- LOCAL UCHAR n; \
- \
- T(TS); \
- flags._H = flags._N = 0; \
- flags._C = (n = readbyte(tmp = ss)) & (UCHAR)1; \
- flags._Z = !(n = (n & (UCHAR)BIT_7) | (n >> (UCHAR)1)); \
- flags._S = (n & (UCHAR)BIT_7); \
- flags._P = parity(n); \
- writebyte(tmp, n); \
- flags._X = n & (UCHAR)BIT_5; \
- flags._Y = n & (UCHAR)BIT_3; \
- }
-
- void sra_phl() sra_pss(HL, 15);
- void sra_pix() sra_pss(pCBIX, 23);
- void sra_piy() sra_pss(pCBIY, 23);
-
- #undef sra_pss
-
- /*=========================================================================*
- * srl_r *
- *=========================================================================*/
- /*
- ----------
- 0 --> | 7 -> 0 | ---> CY
- ----------
- r
-
- */
- #define srl_r(r, TS) { \
- T(TS); \
- flags._H = flags._N = 0; \
- flags._C = (r) & (UCHAR)1; \
- flags._Z = !((r) >>= (UCHAR)1); \
- flags._S = ((r) & (UCHAR)BIT_7); \
- flags._P = parity(r); \
- flags._X = (r) & (UCHAR)BIT_5; \
- flags._Y = (r) & (UCHAR)BIT_3; \
- }
-
- void srl_b() srl_r(B, 8);
- void srl_c() srl_r(C, 8);
- void srl_d() srl_r(D, 8);
- void srl_e() srl_r(E, 8);
- void srl_h() srl_r(H, 8);
- void srl_Ix() srl_r(HX, 15);
- void srl_Iy() srl_r(HY, 15);
- void srl_l() srl_r(L, 8);
- void srl_iX() srl_r(LX, 15);
- void srl_iY() srl_r(LY, 15);
- void srl_a() srl_r(A, 8);
-
- #undef srl_r
-
- /*=========================================================================*
- * srl_phl *
- *=========================================================================*/
- /*
- ----------
- 0 --> | 7 -> 0 | ---> CY
- ----------
- (HL),(IX+d),(IY+d)
-
- */
- #define srl_pss(ss, TS) \
- { \
- LOCAL USHORT tmp; \
- LOCAL UCHAR n; \
- \
- T(TS); \
- flags._H = flags._N = 0; \
- flags._C = (n = readbyte(tmp = ss)) & (UCHAR)1; \
- flags._Z = !(n >>= (UCHAR)1); \
- flags._S = (n & (UCHAR)BIT_7); \
- flags._P = parity(n); \
- writebyte(tmp, n); \
- flags._X = n & (UCHAR)BIT_5; \
- flags._Y = n & (UCHAR)BIT_3; \
- }
-
- void srl_phl() srl_pss(HL, 15);
- void srl_pix() srl_pss(pCBIX, 23);
- void srl_piy() srl_pss(pCBIY, 23);
-
- #undef srl_pss
-
- /*=========================================================================*
- * rld *
- *=========================================================================*/
- /****** RLD: ____________________
- ^ |
- [A] 1111 1111 [(HL)] 1111 1111
- ^ | ^ |
- ---------------- ------
- **/
- void rld()
- {
- LOCAL UCHAR n;
-
- T(18);
- writebyte(HL, (A & (UCHAR)0x0F) | ((n=readbyte(HL))<<4) );
- A = (A & (UCHAR)0xF0) | (n>>4);
- flags._H = flags._N = 0;
- flags._Z = !A;
- flags._S = (A & (UCHAR)BIT_7);
- flags._P = parity(A);
- flags._X = A & (UCHAR)BIT_5;
- flags._Y = A & (UCHAR)BIT_3;
- };
-
- /*=========================================================================*
- * rrd *
- *=========================================================================*/
- /****** RRD: ______________ ____
- ^ | ^ |
- [A] 1111 1111 [(HL)] 1111 1111
- ^ |
- -----------------------
- **/
- void rrd()
- {
- LOCAL UCHAR n;
-
- T(18);
- writebyte(HL, (A<<4) | ((n = readbyte(HL))>>4));
- A = (A & (UCHAR)0xF0) | (n & (UCHAR)0x0F);
- flags._Z = !A;
- flags._H = flags._N = 0;
- flags._S = (A & (UCHAR)BIT_7);
- flags._P = parity(A);
- flags._X = A & (UCHAR)BIT_5;
- flags._Y = A & (UCHAR)BIT_3;
- }
-
- /* =================================== */
- #define rlc_CB(r) { T(23); rlc_pix(); r=readbyte(pCBIX); }
- void rlc_pixb() rlc_CB(B);
- void rlc_pixc() rlc_CB(C);
- void rlc_pixd() rlc_CB(D);
- void rlc_pixe() rlc_CB(E);
- void rlc_pixa() rlc_CB(A);
- #undef rlc_CB
- #define rlc_CB(r) { T(23); rlc_piy(); r=readbyte(pCBIY); }
- void rlc_piyb() rlc_CB(B);
- void rlc_piyc() rlc_CB(C);
- void rlc_piyd() rlc_CB(D);
- void rlc_piye() rlc_CB(E);
- void rlc_piya() rlc_CB(A);
- #undef rlc_CB
- #define rrc_CB(r) { T(23); rrc_pix(); r=readbyte(pCBIX); }
- void rrc_pixb() rrc_CB(B);
- void rrc_pixc() rrc_CB(C);
- void rrc_pixd() rrc_CB(D);
- void rrc_pixe() rrc_CB(E);
- void rrc_pixa() rrc_CB(A);
- #undef rrc_CB
- #define rrc_CB(r) { T(23); rrc_piy(); r=readbyte(pCBIY); }
- void rrc_piyb() rrc_CB(B);
- void rrc_piyc() rrc_CB(C);
- void rrc_piyd() rrc_CB(D);
- void rrc_piye() rrc_CB(E);
- void rrc_piya() rrc_CB(A);
- #undef rrc_CB
- #define rl_CB(r) { T(23); rl_pix(); r=readbyte(pCBIX); }
- void rl_pixb() rl_CB(B);
- void rl_pixc() rl_CB(C);
- void rl_pixd() rl_CB(D);
- void rl_pixe() rl_CB(E);
- void rl_pixa() rl_CB(A);
- #undef rl_CB
- #define rl_CB(r) { T(23); rl_piy(); r=readbyte(pCBIY); }
- void rl_piyb() rl_CB(B);
- void rl_piyc() rl_CB(C);
- void rl_piyd() rl_CB(D);
- void rl_piye() rl_CB(E);
- void rl_piya() rl_CB(A);
- #undef rl_CB
- #define rr_CB(r) { T(23); rr_pix(); r=readbyte(pCBIX); }
- void rr_pixb() rr_CB(B);
- void rr_pixc() rr_CB(C);
- void rr_pixd() rr_CB(D);
- void rr_pixe() rr_CB(E);
- void rr_pixa() rr_CB(A);
- #undef rr_CB
- #define rr_CB(r) { T(23); rr_piy(); r=readbyte(pCBIY); }
- void rr_piyb() rr_CB(B);
- void rr_piyc() rr_CB(C);
- void rr_piyd() rr_CB(D);
- void rr_piye() rr_CB(E);
- void rr_piya() rr_CB(A);
- #undef rr_CB
- #define sla_CB(r) { T(23); sla_pix(); r=readbyte(pCBIX); }
- void sla_pixb() sla_CB(B);
- void sla_pixc() sla_CB(C);
- void sla_pixd() sla_CB(D);
- void sla_pixe() sla_CB(E);
- void sla_pixa() sla_CB(A);
- #undef sla_CB
- #define sla_CB(r) { T(23); sla_piy(); r=readbyte(pCBIY); }
- void sla_piyb() sla_CB(B);
- void sla_piyc() sla_CB(C);
- void sla_piyd() sla_CB(D);
- void sla_piye() sla_CB(E);
- void sla_piya() sla_CB(A);
- #undef sla_CB
- #define sra_CB(r) { T(23); sra_pix(); r=readbyte(pCBIX); }
- void sra_pixb() sra_CB(B);
- void sra_pixc() sra_CB(C);
- void sra_pixd() sra_CB(D);
- void sra_pixe() sra_CB(E);
- void sra_pixa() sra_CB(A);
- #undef sra_CB
- #define sra_CB(r) { T(23); sra_piy(); r=readbyte(pCBIY); }
- void sra_piyb() sra_CB(B);
- void sra_piyc() sra_CB(C);
- void sra_piyd() sra_CB(D);
- void sra_piye() sra_CB(E);
- void sra_piya() sra_CB(A);
- #undef sra_CB
- #define sll_CB(r) { T(23); sll_pix(); r=readbyte(pCBIX); }
- void sll_pixb() sll_CB(B);
- void sll_pixc() sll_CB(C);
- void sll_pixd() sll_CB(D);
- void sll_pixe() sll_CB(E);
- void sll_pixa() sll_CB(A);
- #undef sll_CB
- #define sll_CB(r) { T(23); sll_piy(); r=readbyte(pCBIY); }
- void sll_piyb() sll_CB(B);
- void sll_piyc() sll_CB(C);
- void sll_piyd() sll_CB(D);
- void sll_piye() sll_CB(E);
- void sll_piya() sll_CB(A);
- #undef sll_CB
- #define srl_CB(r) { T(23); srl_pix(); r=readbyte(pCBIX); }
- void srl_pixb() srl_CB(B);
- void srl_pixc() srl_CB(C);
- void srl_pixd() srl_CB(D);
- void srl_pixe() srl_CB(E);
- void srl_pixa() srl_CB(A);
- #undef srl_CB
- #define srl_CB(r) { T(23); srl_piy(); r=readbyte(pCBIY); }
- void srl_piyb() srl_CB(B);
- void srl_piyc() srl_CB(C);
- void srl_piyd() srl_CB(D);
- void srl_piye() srl_CB(E);
- void srl_piya() srl_CB(A);
- #undef srl_CB
-
- #define res_CB(r, expr) { T(23); expr(); r=readbyte(pCBIX); }
- void res_0_pixb() res_CB(B, res_0_pix);
- void res_0_pixc() res_CB(C, res_0_pix);
- void res_0_pixd() res_CB(D, res_0_pix);
- void res_0_pixe() res_CB(E, res_0_pix);
- void res_0_pixa() res_CB(A, res_0_pix);
- void res_1_pixb() res_CB(B, res_1_pix);
- void res_1_pixc() res_CB(C, res_1_pix);
- void res_1_pixd() res_CB(D, res_1_pix);
- void res_1_pixe() res_CB(E, res_1_pix);
- void res_1_pixa() res_CB(A, res_1_pix);
- void res_2_pixb() res_CB(B, res_2_pix);
- void res_2_pixc() res_CB(C, res_2_pix);
- void res_2_pixd() res_CB(D, res_2_pix);
- void res_2_pixe() res_CB(E, res_2_pix);
- void res_2_pixa() res_CB(A, res_2_pix);
- void res_3_pixb() res_CB(B, res_3_pix);
- void res_3_pixc() res_CB(C, res_3_pix);
- void res_3_pixd() res_CB(D, res_3_pix);
- void res_3_pixe() res_CB(E, res_3_pix);
- void res_3_pixa() res_CB(A, res_3_pix);
- void res_4_pixb() res_CB(B, res_4_pix);
- void res_4_pixc() res_CB(C, res_4_pix);
- void res_4_pixd() res_CB(D, res_4_pix);
- void res_4_pixe() res_CB(E, res_4_pix);
- void res_4_pixa() res_CB(A, res_4_pix);
- void res_5_pixb() res_CB(B, res_5_pix);
- void res_5_pixc() res_CB(C, res_5_pix);
- void res_5_pixd() res_CB(D, res_5_pix);
- void res_5_pixe() res_CB(E, res_5_pix);
- void res_5_pixa() res_CB(A, res_5_pix);
- void res_6_pixb() res_CB(B, res_6_pix);
- void res_6_pixc() res_CB(C, res_6_pix);
- void res_6_pixd() res_CB(D, res_6_pix);
- void res_6_pixe() res_CB(E, res_6_pix);
- void res_6_pixa() res_CB(A, res_6_pix);
- void res_7_pixb() res_CB(B, res_7_pix);
- void res_7_pixc() res_CB(C, res_7_pix);
- void res_7_pixd() res_CB(D, res_7_pix);
- void res_7_pixe() res_CB(E, res_7_pix);
- void res_7_pixa() res_CB(A, res_7_pix);
- #undef res_CB
- #define res_CB(r, expr) { T(23); expr(); r=readbyte(pCBIY); }
- void res_0_piyb() res_CB(B, res_0_piy);
- void res_0_piyc() res_CB(C, res_0_piy);
- void res_0_piyd() res_CB(D, res_0_piy);
- void res_0_piye() res_CB(E, res_0_piy);
- void res_0_piya() res_CB(A, res_0_piy);
- void res_1_piyb() res_CB(B, res_1_piy);
- void res_1_piyc() res_CB(C, res_1_piy);
- void res_1_piyd() res_CB(D, res_1_piy);
- void res_1_piye() res_CB(E, res_1_piy);
- void res_1_piya() res_CB(A, res_1_piy);
- void res_2_piyb() res_CB(B, res_2_piy);
- void res_2_piyc() res_CB(C, res_2_piy);
- void res_2_piyd() res_CB(D, res_2_piy);
- void res_2_piye() res_CB(E, res_2_piy);
- void res_2_piya() res_CB(A, res_2_piy);
- void res_3_piyb() res_CB(B, res_3_piy);
- void res_3_piyc() res_CB(C, res_3_piy);
- void res_3_piyd() res_CB(D, res_3_piy);
- void res_3_piye() res_CB(E, res_3_piy);
- void res_3_piya() res_CB(A, res_3_piy);
- void res_4_piyb() res_CB(B, res_4_piy);
- void res_4_piyc() res_CB(C, res_4_piy);
- void res_4_piyd() res_CB(D, res_4_piy);
- void res_4_piye() res_CB(E, res_4_piy);
- void res_4_piya() res_CB(A, res_4_piy);
- void res_5_piyb() res_CB(B, res_5_piy);
- void res_5_piyc() res_CB(C, res_5_piy);
- void res_5_piyd() res_CB(D, res_5_piy);
- void res_5_piye() res_CB(E, res_5_piy);
- void res_5_piya() res_CB(A, res_5_piy);
- void res_6_piyb() res_CB(B, res_6_piy);
- void res_6_piyc() res_CB(C, res_6_piy);
- void res_6_piyd() res_CB(D, res_6_piy);
- void res_6_piye() res_CB(E, res_6_piy);
- void res_6_piya() res_CB(A, res_6_piy);
- void res_7_piyb() res_CB(B, res_7_piy);
- void res_7_piyc() res_CB(C, res_7_piy);
- void res_7_piyd() res_CB(D, res_7_piy);
- void res_7_piye() res_CB(E, res_7_piy);
- void res_7_piya() res_CB(A, res_7_piy);
- #undef res_CB
-
- /* ++++++++ */
- #define set_CB(r, expr) { T(23); expr(); r=readbyte(pCBIX); }
- void set_0_pixb() set_CB(B, set_0_pix);
- void set_0_pixc() set_CB(C, set_0_pix);
- void set_0_pixd() set_CB(D, set_0_pix);
- void set_0_pixe() set_CB(E, set_0_pix);
- void set_0_pixa() set_CB(A, set_0_pix);
- void set_1_pixb() set_CB(B, set_1_pix);
- void set_1_pixc() set_CB(C, set_1_pix);
- void set_1_pixd() set_CB(D, set_1_pix);
- void set_1_pixe() set_CB(E, set_1_pix);
- void set_1_pixa() set_CB(A, set_1_pix);
- void set_2_pixb() set_CB(B, set_2_pix);
- void set_2_pixc() set_CB(C, set_2_pix);
- void set_2_pixd() set_CB(D, set_2_pix);
- void set_2_pixe() set_CB(E, set_2_pix);
- void set_2_pixa() set_CB(A, set_2_pix);
- void set_3_pixb() set_CB(B, set_3_pix);
- void set_3_pixc() set_CB(C, set_3_pix);
- void set_3_pixd() set_CB(D, set_3_pix);
- void set_3_pixe() set_CB(E, set_3_pix);
- void set_3_pixa() set_CB(A, set_3_pix);
- void set_4_pixb() set_CB(B, set_4_pix);
- void set_4_pixc() set_CB(C, set_4_pix);
- void set_4_pixd() set_CB(D, set_4_pix);
- void set_4_pixe() set_CB(E, set_4_pix);
- void set_4_pixa() set_CB(A, set_4_pix);
- void set_5_pixb() set_CB(B, set_5_pix);
- void set_5_pixc() set_CB(C, set_5_pix);
- void set_5_pixd() set_CB(D, set_5_pix);
- void set_5_pixe() set_CB(E, set_5_pix);
- void set_5_pixa() set_CB(A, set_5_pix);
- void set_6_pixb() set_CB(B, set_6_pix);
- void set_6_pixc() set_CB(C, set_6_pix);
- void set_6_pixd() set_CB(D, set_6_pix);
- void set_6_pixe() set_CB(E, set_6_pix);
- void set_6_pixa() set_CB(A, set_6_pix);
- void set_7_pixb() set_CB(B, set_7_pix);
- void set_7_pixc() set_CB(C, set_7_pix);
- void set_7_pixd() set_CB(D, set_7_pix);
- void set_7_pixe() set_CB(E, set_7_pix);
- void set_7_pixa() set_CB(A, set_7_pix);
- #undef set_CB
- #define set_CB(r, expr) { T(23); expr(); r=readbyte(pCBIY); }
- void set_0_piyb() set_CB(B, set_0_piy);
- void set_0_piyc() set_CB(C, set_0_piy);
- void set_0_piyd() set_CB(D, set_0_piy);
- void set_0_piye() set_CB(E, set_0_piy);
- void set_0_piya() set_CB(A, set_0_piy);
- void set_1_piyb() set_CB(B, set_1_piy);
- void set_1_piyc() set_CB(C, set_1_piy);
- void set_1_piyd() set_CB(D, set_1_piy);
- void set_1_piye() set_CB(E, set_1_piy);
- void set_1_piya() set_CB(A, set_1_piy);
- void set_2_piyb() set_CB(B, set_2_piy);
- void set_2_piyc() set_CB(C, set_2_piy);
- void set_2_piyd() set_CB(D, set_2_piy);
- void set_2_piye() set_CB(E, set_2_piy);
- void set_2_piya() set_CB(A, set_2_piy);
- void set_3_piyb() set_CB(B, set_3_piy);
- void set_3_piyc() set_CB(C, set_3_piy);
- void set_3_piyd() set_CB(D, set_3_piy);
- void set_3_piye() set_CB(E, set_3_piy);
- void set_3_piya() set_CB(A, set_3_piy);
- void set_4_piyb() set_CB(B, set_4_piy);
- void set_4_piyc() set_CB(C, set_4_piy);
- void set_4_piyd() set_CB(D, set_4_piy);
- void set_4_piye() set_CB(E, set_4_piy);
- void set_4_piya() set_CB(A, set_4_piy);
- void set_5_piyb() set_CB(B, set_5_piy);
- void set_5_piyc() set_CB(C, set_5_piy);
- void set_5_piyd() set_CB(D, set_5_piy);
- void set_5_piye() set_CB(E, set_5_piy);
- void set_5_piya() set_CB(A, set_5_piy);
- void set_6_piyb() set_CB(B, set_6_piy);
- void set_6_piyc() set_CB(C, set_6_piy);
- void set_6_piyd() set_CB(D, set_6_piy);
- void set_6_piye() set_CB(E, set_6_piy);
- void set_6_piya() set_CB(A, set_6_piy);
- void set_7_piyb() set_CB(B, set_7_piy);
- void set_7_piyc() set_CB(C, set_7_piy);
- void set_7_piyd() set_CB(D, set_7_piy);
- void set_7_piye() set_CB(E, set_7_piy);
- void set_7_piya() set_CB(A, set_7_piy);
- #undef set_CB
-
- /* EOF: Rotate.c */
-