// transpose direct
#include
using namespace std;
#include „prob-16-kern.h”
#include „prob-16-bope.h”
#define ROWMASK 56
#define COLMASK 7
extern int currentpoint;
int sizeofpoint = 24;
int pointdata; // 4 bytes
int a, i, j; // 3 x 4 bytes
int x; // 4 bytes
int g; // 4 bytes
int main()
{
int A;
tx(1); tx(2); tx(4); tx(8); tx(16); tx(32);
i = (currentpoint & ROWMASK); // 111000 i
j = currentpoint & COLMASK; // 000111 j
a = 0;
if ((i >> 3) < j) a = 1; if ((i >> 3) > j) a = 2;
x = (j << 3) ^ (i >> 3); // i j exchanged to obtain x as new position of a
g = currentpoint ^ x; // difference between currentpoint and x
A = a; // pick up matrix element
t(g); // transfer to x
a = A; // store matrix element
std::cout << ” i j ” << (i >> 3) << ” ” << j << ” ” << a << ” \n”;
o();
}