TweetFollow Us on Twitter

Mar 00 Challenge

Volume Number: 16 (2000)
Issue Number: 3
Column Tag: Programmer's Challenge

Programmer's Challenge

by Bob Boonstra, Westford, MA

Sum of Powers

A year or so back, Ken Slezak wrote me to say: "Recently my 7th grade son showed me an extra credit math problem. Given a number from 1 to 100, create that number from one, two, or three squared numbers added or subtracted together.... It turned out to be more difficult than I thought! Might this make an interesting programming challenge?" Well, Ken, we're about to find out.

First, though, we need to spice up the problem a bit. I've been trying to make the problems a little easier of late, but the 7th grade level, even the 7th grade extra credit level, would be a bit too easy. First, we'll expand the problem domain to include any positive number that fits into a signed 32-bit long integer. Second, we'll expand the number of terms allowed. And third, instead of limiting the problem to only squared numbers, we'll allow any positive exponent greater than 1.

The prototype for the code you should write is:

typedef struct IntegerPower {
	long value;		/* term is sign*value^power */
	short power;	/* power = 2,3,4,... */
	short sign;		/* +1 or -1 */
} IntegerPower;

long /* number of factors */ SumOfPowers (
	long result,						/* terms need to sum to this result */
	IntegerPower terms[],		/* return terms sign*value^power here */
	long maxTerms						/* maximum number of terms allowed */
);

Your SumOfPowers routine will be called a number of times. Each time, you must identify a set of terms which sum to the specified result. Each term is a value raised to an integer power greater than 1, multiplied by a sign value. You should return the number of terms used to form the result, or zero if the result cannot be formed with maxTerms terms.

The winner will be the solution that forms the desired results with the minimum number of terms. A time penalty of one term will be added per 100 milliseconds of execution time. All solutions must be calculated at execution time; any entry that precalculates a solution will be disqualified.

This will be a native PowerPC Challenge, using the CodeWarrior Pro 5 environment. Solutions may be coded in C, C++, or Pascal. Solutions in Java will also be accepted, but Java entries must be accompanied by a test driver that uses the interface provided in the problem statement.

Ken Slezak earns 2 Challenge points for suggesting this month's Challenge.

Three Months Ago Winner

Congratulations to Jonathan Taylor (Blandford, Dorset, U.K.) for winning the December, 1999, Costas Array Challenge. The Costas Challenge required contestants to produce all of the arrays of a given dimension that satisfied two criteria. First, each row and each column of the array must have exactly one "1", with the remaining entries being zeros. Second, the line connecting a pair of "1"s in an array may not have the same slope as the line connecting any other pair of "1"s. Costas arrays have properties that make it an ideal discrete waveform for some sensor applications. The number of Costas arrays of order N increases until N==17, after which it decreases at least until N==23. This Challenge attracted 16 entries, 13 of which worked correctly.

Jonathan's solution is recursive for array sizes greater than 17, but he gains speed by unrolling the code for smaller orders. He also took advantage of the fact that assembly language was permitted for this Challenge. For these smaller arrays, he maintained the position of the "1"s in each row in separate registers, eliminating a significant number of memory accesses. This optimization allowed Jonathan's entry to run approximately 15% faster than the second place entry by Ernst Munter. Jonathan included a nice description of the recursive and unrolled algorithms in the preface to his code, so I won't repeat his description here.

I evaluated every entry by having them calculate the Costas arrays of orders 5 through 13, inclusive. I then extended the tests to include arrays of orders through 15. Finally, I tested the top entries with arrays of orders through 17. In evaluating the correctness of the arrays generated, I made use of some code provided by Ludovic Nicolle. Ludo's code verified that each array produced met the criteria for a Costas array, and that each array was distinct from any other array. Solutions were judged correct if the number of valid, unique Costas arrays produced equaled the known number of Costas arrays of a given order. Judging correctness would have been more difficult if any of the solutions had completed problems where the number of Costas arrays is unknown; fortunately (or unfortunately, depending on your point of view), none of the entries completed problems of that size. Several contestants observed that execution time increased by a factor of ~5.3 from one order to the next, and some estimated that 1000 fast PowerMacs should be able to calculate the arrays of order 24 in a couple of weeks. Perhaps we should turn this over to the distributed.net folks.

The table below lists, for each of the solutions submitted, the cumulative time required to calculate the Costas arrays up to orders 13, 15, and 17. It also indicates the code size, data size, and programming language used by each solution. As usual, the number in parentheses after the entrant's name is the total number of Challenge points earned in all Challenges prior to this one.

Name Time (13) (secs) Time (15) (secs) Time (17) (secs) Errors Code Size Data Size Lang
Jonathan Taylor (4)7.69228.791246.12021334200C/asm
Ernst Munter (547)9.31270.321477.03046688608C++/asm
Ludovic Nicolle (48)10.02289.08N/A0261224C++
Xan Gregg (116)12.06340.65N/A044288C++
Rob Shearer (41)12.06346.45N/A015872010300C++
Willeke Rieken (61)19.36540.05N/A024208C
Tom Saxton (158)33.161011.24N/A015008C
Greg Sadetsky (2)40.741122.02N/A020448C
Michael Lewis51.941592.36N/A0152872C
Randy Boring (112)57.321801.37N/A0151624C++
Sebastian Maurer (77)59.831927.93N/A0121674C
Brian Hall125.353642.11N/A02880412C
Brady Duga (10)130.50N/AN/A04152371C++
D. L.N/AN/AN/A1
C. L.N/AN/AN/A1
B. B.N/AN/AN/A1

Top Contestants

Listed here are the Top Contestants for the Programmer's Challenge, including everyone who has accumulated 10 or more points during the past two years. The numbers below include points awarded over the 24 most recent contests, including points earned by this month's entrants.

Rank Name Points
1.Munter, Ernst247
2.Saxton, Tom139
3.Maurer, Sebastian67
4.Rieken, Willeke51
5.Heithcock, JG43
6.Shearer, Rob43
7.Boring, Randy39
8.Taylor, Jonathan24
9.Brown, Pat20
10.Jones, Dennis12
11.Hart, Alan11
12.Duga, Brady10
13.Hewett, Kevin10
14.Murphy, ACC10
15.Selengut, Jared10
16.Strout, Joe10
17.Varilly, Patrick10

There are three ways to earn points: (1) scoring in the top 5 of any Challenge, (2) being the first person to find a bug in a published winning solution or, (3) being the first person to suggest a Challenge that I use. The points you can win are:

1st place20 points
2nd place10 points
3rd place7 points
4th place4 points
5th place2 points
finding bug2 points
suggesting Challenge2 points

Here is Jonthan Taylor's winning Costas solution:

Costas.c
Copyright © 1999 Jonathan Taylor

/*
The algorithm works by attempting to find a position for a '1' in the first row of the array, and 
then to work down the array attempting to fill each row in turn until there is no permissible move,
in which case the program backtracks to the previous row and tries the next permissible position. 
At the beginning of each row, it calculates a bit-mask which shows which positions have been
forbidden by the choice of position on the previous rows.

There are two conditions that are detected:
  1. A '1' is already in the column
  2. Putting a '1' in this position would create three in a row:
Let a A and B be the x position of the '1' in two previous rows. Every
existing combination of A and B is checked in turn. C is another row's x
position. This row is the one which, when combined with B and C will
cause one of the positions in the current row to be forbidden. For
example:
    1000 0000 row described by A
    0000 0010
    0010 0000 row described by B
    0100 0000 row described by C
    0001 0000
    (the next row is the one currently being determined)
the '1' in row B is two right and two down of the one in A, so the
position two right and two down from the '1' in row C is forbidden. The
program will record this information appropriately

The program was a recursive function which stores the position of the 1
in each row (rowPos) in RAM, as well as the bitField for each row. The
bitField is a long where each bit represents one of the positions that
the '1' could be placed in the current row. If a bit is set, that
position is forbidden by the rules as applied to the rows that have
already been decided. Unused bits are also one. Note that each level of
recursion has its own bitField variable, each of which will be very
different.

In each recursion, it sets bitField to the appropriate value. If
bitField is now equal to -1, there are no permissible places to put the
'1' on this row, and the function returns to the previous recursion. If
it does not return, it then checks each bit in bitField to see if it is
a zero. If it is, that is a permissible place for the '1'. It records
this selection and calls the next level of recursion (when that level
returns, execution will resume by trying the next bit in bitField).

If by placing a '1' at this level the array has been successfully
filled, the array has the correct values entered in it, and the function
then returns to the previous level of recursion in order to continue the
search for the next solution. It should be noted that if an array is a
valid solution, then its horizontal reflection is also a different,
valid solution (for 2 or more rows). That is also recorded in the
solution list. This allows the running time to be roughly halved,
because once the first row has been half traversed, all the solutions
will have been found.

The problem with that is that the program must be stopped halfway
through the arrays in order to prevent there being repeats. The
condition is slightly different for even- and odd-sized arrays, so one
of two different tests is used depending on the array size.

This version was used for cases of n>17. Version 2 handles smaller
cases (much faster!). The underlying algorithm is the same, though. It
could easily be extended to higher ones by writing more code.

Version 2

I suspected that the limiting factor for the speed of the previous
example was probably memory accesses. In calculating bitField, the
positions of the '1's in previous rows are used over and over again.
However, they are not used in order, and neither I nor the complier
could find any effective way of caching the values in registers to save
on RAM accesses.  However, I realised there were in fact enough
registers to fit them all into registers.

This strategy is extremely fast, as it requires only one write to RAM
when calling the next recursion level, and one read when returning.
However there is a problem. I have been unable to discover a way of
indirectly addressing a register. It is not possible to design a loop
that will access, say, row_position[n] if it is stores in register n. It
was therefore necessary to unroll all the loops completely (If anyone
wants to tell me how I could have performed indirect addressing of
registers, I'd love to know!).

Since the loops were of variable length depending on the level of
recursion, it was necessary to write new code for every level of
recursion, with 'goto's to "call" the next level of recursion. This has
the huge drawback that new code must be written in order to allow the
program do determine larger arrays. The competition code was able to
deal with up to 17x17 arrays. What I should have done was to write a
program to generate the C code, since the unrolling is completely
deterministic, although fairly complex. As it was, I had to spend a long
time checking for errors in the unrolling.

By the 17th row, there are 140 calls of SetBit()! There are only 17 bits
to be set. This is a huge overkill if it turns out there is no place to
go anyway! As a result, I inserted the line:

if(tempBitField==-1) goto endSetForbiddenXX;

after every 5 SetBit() s. This allows the subsequent calls to be skipped
if there is already no place left to go. I have no idea how often they
should be put - I didn't have time to experiment - and they take up
valuable execution time. With some serious experimentation, a better
distribution of the 'if's could almost certainly be found.

This version has several limitations. The problem of loop unrolling
limiting the array size can be partly solved by producing an automatic C
code generator as described. The other potential problem is lack of
registers. I reckon about 8-10 are needed in addition to the
row-position ones. With current processors having 32 integer registers,
22x22 arrays could potentially be calculated. After that, the values
would have to spill over into RAM, causing some, but not initially much,
slowdown.

*/

#include "Costas.h"
#include <MacTypes.h>

// this macro is the assembly code for the detection of a three-in-a-row 
// situation
#define SetBit(A,B,C)   add        r0,A,B;    \
                                subf       r0,C,r0;   \
                                slw        r0,kOne,r0;    \
                                or         tempBitField,tempBitField,r0

// this macro is the assembly code for detection of an already-filled 
// column
#define HadBit(A)     slw     r0,kOne,A;  \
              or      tempBitField,tempBitField,r0

#pragma optimization_level 2
/* I don't remember exactly why this was needed. If the level is zero, the 'register' keywords are 
ignored. If it is too high, maybe it just took for too long to compile without gaining anything... */

void DoCostasRow(long row);
long EnumerateCostasInRegisters(int n,unsigned long *costasArrays);

long      gCount,gMax_Rows;
unsigned long *gCostasArrays;

long EnumerateCostas(int n,unsigned long *costasArrays)
{
  if(n>17)
  {
    gMax_Rows = n;
    gCostasArrays=costasArrays;
    DoCostasRow(0); //call recursive function
    return(gCount);
  }
  else
    return(EnumerateCostasInRegisters(n,costasArrays));
}

void DoCostasRow(long row)
{
  register long     n,m,bitField,bitNum;
  static long       doExit; //used to signal when all arrays found
  static long       count;      //number found
  static long       max_rows;   //dimensions of array
  static long       blankBitField;
  static long       rowPosStore[32];  //x position of the '1' //in each row
  static unsigned long  *costasArrays;

  if(row == 0)    //setup code
  {
    count = 0;
    max_rows = gMax_Rows;
    blankBitField = (-1)^((1<<max_rows)-1);
    costasArrays=gCostasArrays;
    doExit=false;
  }
  // This next bit detects which positions are forbidden
  // See introduction for more details
  bitField = blankBitField; //make all x positions permissible
  for(n=0;n<row;n++)
  {
    bitField|=(1<<rowPosStore[n]);  //forbid (condition #1)
    for(m=0;m<n;m++)                 //forbid (condition #2)
      bitField |= (1<<
      (rowPosStore[n]+rowPosStore[row-1-m]-rowPosStore[n-m-1]));
  }
  if(bitField == -1)
    return;           //all positions are forbidden

  for(bitNum=0;bitNum<max_rows;bitNum++)
//try each position in turn
  {
    if((bitField&(1<<bitNum)) == 0)   //permissible
    {
      //Next comes code for checking when we are done 
      //(see introduction)
      if(max_rows%2 == 1)   //odd-sized array
      {
        if(row==1)
        {
          if(bitNum>max_rows/2 && rowPosStore[0]==max_rows/2)
          {
            gCount=count;
            doExit=true;
            return;
          }
        }
      }
      else if(row==0)   //even
      {
        if(bitNum>=max_rows/2)
        {
          gCount=count;
          return;
        }
      }

      rowPosStore[row] = bitNum;
      if(row == max_rows-1)     //got a complete array
      {
        for(n=0;n<max_rows;n++)      //record it
          costasArrays[count*max_rows+n] = (1<<rowPosStore[n]);
        count++;
        if(max_rows != 1)
        {
          for(n=0;n<max_rows;n++)    
                //and its horizontal reflection
            costasArrays[count*max_rows+n] = 
              ((1<<(max_rows-1))>>rowPosStore[n]);
          count++;
        }
        else        //array is 1x1 - got the solution so exit
          gCount=count;
        return;
      }
      DoCostasRow(row+1);   //call next level of recursion
      if(doExit) return;      //is set when all arrays are found
    }
  }
}

#define STORE0  RP00=bitNum
#define STORE1  RP01=bitNum
#define STORE2  RP02=bitNum
#define STORE3  RP03=bitNum
#define STORE4  RP04=bitNum
#define STORE5  RP05=bitNum
#define STORE6  RP06=bitNum
#define STORE7  RP07=bitNum
#define STORE8  RP08=bitNum
#define STORE9  RP09=bitNum
#define STORE10 RP10=bitNum
#define STORE11 RP11=bitNum
#define STORE12 RP12=bitNum
#define STORE13 RP13=bitNum
#define STORE14 RP14=bitNum
#define STORE15 RP15=bitNum

#define LOAD0 bitNum=RP00
#define LOAD1 bitNum=RP01
#define LOAD2 bitNum=RP02
#define LOAD3 bitNum=RP03
#define LOAD4 bitNum=RP04
#define LOAD5 bitNum=RP05
#define LOAD6 bitNum=RP06
#define LOAD7 bitNum=RP07
#define LOAD8 bitNum=RP08
#define LOAD9 bitNum=RP09
#define LOAD10  bitNum=RP10
#define LOAD11  bitNum=RP11
#define LOAD12  bitNum=RP12
#define LOAD13  bitNum=RP13
#define LOAD14  bitNum=RP14
#define LOAD15  bitNum=RP15

long EnumerateCostasInRegisters(int n,
                  unsigned long *costasArrays)
{
  register long   bitField;     
                  /*  this is a set of bits that records which
                    positions are forbidden due to the choices
                      for previous rows. A '1' means the position
                          is forbidden  */
  register long tempBitField; 
      /*  when a new level of recursion is begun, this
          stores the new value of 'bitField' as it is
            calculated. But if there are no legal positions,
              an immediate return occurs. bitField is only
                updated if there is al least one position, since
                  the bitField value for the previous recursion
                    level must be stored in RAM - a slow process!  */
  register long bitNum; 
          //the current x position in the row under consideration
  register long   blankBitField;
  register long   kOne; 
          //code is faster if this is a register instead of a constant
  register long   RP00,RP01,RP02,RP03,RP04,RP05,RP06,RP07,
                  RP08,RP09,RP10,RP11,RP12,RP13,RP14,RP15;
    //RPn ('row position n') stores the x coordinate of the '1' on row n
  long        bitFieldStore[32];
  /* these store the bitFields as calculated for previous recursion levels
  They must be reloaded after a return to a previous recursion level */
  long        count;            //number of solutions found

  kOne=1;
  count=0;
begin0:
  blankBitField=(-1)^((kOne<<n)-1);
  bitField=blankBitField;
  bitFieldStore[0]=bitField;

  for(bitNum=0;bitNum<n;)    //try every x position in turn
  {
    if((bitField&(kOne<<bitNum))==0)  
                              //if this position not forbidden
    {
      //RowPosStore[row]=bitNum;
      STORE0;

      if(n==1)        //record layout!
      {
        costasArrays[count*n]=(1<<RP00);
                      //record in result array
        count++;
        return count; //return number found
      }
      goto begin1;    //try the next row...
    }
returnPoint0:
    bitNum++;
  }
doReturn0:
  return count;

begin1:
  tempBitField=blankBitField;
  asm { HadBit(RP00)  } //can't be below the '1' in the first row
  bitField=tempBitField;
  bitFieldStore[1]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE1;

      if(n==2)      //record layout!
      {
        if(RP00>=n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        count++;
        costasArrays[count*n]=(2>>RP00);
        costasArrays[count*n+1]=(2>>RP01);
        count++;
        goto doReturn1;
      }
      goto begin2;
    }
returnPoint1:
    bitNum++;
  }
doReturn1:
  //  bitNum=RowPosStore[row];
  LOAD0;
  bitField=bitFieldStore[0];
  goto returnPoint0;

begin2:
  tempBitField=blankBitField;
setForbidden2:
   asm{   HadBit(RP00) }  //set forbidden bits (condition #1)
   asm{   HadBit(RP01) }

   asm{   SetBit(RP01,RP01,RP00)} 
      //set forbidden bits (condition #2)
endSetForbidden2:
  if(tempBitField==-1)  
      //give up now if no positions permitted
    goto returnPoint1;
  bitField=tempBitField;
  bitFieldStore[2]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE2;

      if(n==3)      //record layout!
      {
        if(RP01>n/2 && RP00==n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        count++;
        costasArrays[count*n]=(4>>RP00);
        costasArrays[count*n+1]=(4>>RP01);
        costasArrays[count*n+2]=(4>>RP02);
        count++;
        goto doReturn2;
      }
      goto begin3;
    }
returnPoint2:
    bitNum++;
  }
doReturn2:
  //  bitNum=RowPosStore[row];
  LOAD1;
  bitField=bitFieldStore[1];
  goto returnPoint1;

begin3:
  tempBitField=blankBitField;
setForbidden3:
   asm{ HadBit(RP00)}
   asm{ HadBit(RP01)}
   asm{ HadBit(RP02)}

   asm{         SetBit(RP02,RP01,RP00)  }
   asm{         SetBit(RP02,RP02,RP01)  }
   asm{         SetBit(RP01,RP02,RP00)  }

endSetForbidden3:
  if(tempBitField==-1)
    goto returnPoint2;
  bitField=tempBitField;
  bitFieldStore[3]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE3;
      if(n==4)      //record layout!
      {
        if(RP00>=n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        count++;
        costasArrays[count*n]=(8>>RP00);
        costasArrays[count*n+1]=(8>>RP01);
        costasArrays[count*n+2]=(8>>RP02);
        costasArrays[count*n+3]=(8>>RP03);
        count++;
        goto doReturn3;
      }
      goto begin4;
    }
returnPoint3:
    bitNum++;
  }
doReturn3:
  //  bitNum=RowPosStore[row];
  LOAD2;
  bitField=bitFieldStore[2];
  goto returnPoint2;

begin4:
  tempBitField=blankBitField;
setForbidden4:
   asm{ HadBit(RP00)
      HadBit(RP01)
      HadBit(RP02)
      HadBit(RP03)

      SetBit(RP03,RP01,RP00)
      SetBit(RP03,RP02,RP01)
      SetBit(RP03,RP03,RP02)
      SetBit(RP02,RP02,RP00)
      SetBit(RP02,RP03,RP01)
      SetBit(RP01,RP03,RP00)    }

endSetForbidden4:
  if(tempBitField==-1)
    goto returnPoint3;
  bitField=tempBitField;
  bitFieldStore[4]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE4;
      if(n==5)      //record layout!
      {
        if(RP01>n/2 && RP00==n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        count++;
        costasArrays[count*n]=(16>>RP00);
        costasArrays[count*n+1]=(16>>RP01);
        costasArrays[count*n+2]=(16>>RP02);
        costasArrays[count*n+3]=(16>>RP03);
        costasArrays[count*n+4]=(16>>RP04);
        count++;
        goto doReturn4;
      }
      goto begin5;
    }
returnPoint4:
    bitNum++;
  }
doReturn4:
  //  bitNum=RowPosStore[row];
  LOAD3;
  bitField=bitFieldStore[3];
  goto returnPoint3;

begin5:
  tempBitField=blankBitField;
setForbidden5:
   asm {  HadBit(RP00)
      HadBit(RP01)
      HadBit(RP02)
      HadBit(RP03)
      HadBit(RP04)

      SetBit(RP04,RP01,RP00)
      SetBit(RP04,RP02,RP01)
      SetBit(RP04,RP03,RP02)
      SetBit(RP04,RP04,RP03)
      SetBit(RP03,RP02,RP00)  }

/*In most cases for large row numbers, I suspect that all positions will be very quickly seen to 
be forbidden. All the subsequent SetBit() calls are unnecessary in that instance. This check allows 
them to be skipped out. It appears after every five SetBit() calls (see introduction for comments) */
  if(tempBitField==-1)
    goto endSetForbidden5;
  asm {
      SetBit(RP03,RP03,RP01)
      SetBit(RP03,RP04,RP02)
      SetBit(RP02,RP03,RP00)
      SetBit(RP02,RP04,RP01)
      SetBit(RP01,RP04,RP00)    }

endSetForbidden5:
  if(tempBitField==-1)
    goto returnPoint4;
  bitField=tempBitField;
  bitFieldStore[5]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE5;

      if(n==6)      //record layout!
      {
        if(RP00>=n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        count++;
        costasArrays[count*n]=(32>>RP00);
        costasArrays[count*n+1]=(32>>RP01);
        costasArrays[count*n+2]=(32>>RP02);
        costasArrays[count*n+3]=(32>>RP03);
        costasArrays[count*n+4]=(32>>RP04);
        costasArrays[count*n+5]=(32>>RP05);
        count++;
        goto doReturn5;
      }
      goto begin6;
    }
returnPoint5:
    bitNum++;
  }
doReturn5:
  //  bitNum=RowPosStore[row];
  LOAD4;
  bitField=bitFieldStore[4];
  goto returnPoint4;

/* the code then continues with begin6 up to begin16. The pattern the code is following after 
each 'begin' should be clear now!

The size of the code grows with n^2, and becomes completely dominated by SetBit(). This is 
definitely the place for further optimization! Several things spring to mind.
At the moment I suspect the SetBit() macros are executed in strict order, since the 
tempBitField register is always being modified. By using a number of different registers 
that are written to, it might be possible to allow a much greater degree of instruction 
interleaving, which looks as if it could at least double the speed if done cleverly?

The other place for improvement is the the 'if(tempBitField==-1)' lines (see note in introduction).
*/

begin6:
  tempBitField=blankBitField;
setForbidden6:
  asm { HadBit(RP00)
      HadBit(RP01)
      HadBit(RP02)
      HadBit(RP03)
      HadBit(RP04)
      HadBit(RP05)

      SetBit(RP05,RP01,RP00)
      SetBit(RP05,RP02,RP01)
      SetBit(RP05,RP03,RP02)
      SetBit(RP05,RP04,RP03)
      SetBit(RP05,RP05,RP04)  }
    if(tempBitField==-1)
      goto endSetForbidden6;
  asm { SetBit(RP04,RP02,RP00)
      SetBit(RP04,RP03,RP01)
      SetBit(RP04,RP04,RP02)
      SetBit(RP04,RP05,RP03)
      SetBit(RP03,RP03,RP00)  }
    if(tempBitField==-1)
      goto endSetForbidden6;
  asm { SetBit(RP03,RP04,RP01)
      SetBit(RP03,RP05,RP02)
      SetBit(RP02,RP04,RP00)
      SetBit(RP02,RP05,RP01)
      SetBit(RP01,RP05,RP00)  }

endSetForbidden6:
  if(tempBitField==-1)
    goto returnPoint5;
  bitField=tempBitField;
  bitFieldStore[6]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE6;

      if(n==7)      //record layout!
      {
        if(RP01>n/2 && RP00==n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        count++;
        costasArrays[count*n]=(64>>RP00);
        costasArrays[count*n+1]=(64>>RP01);
        costasArrays[count*n+2]=(64>>RP02);
        costasArrays[count*n+3]=(64>>RP03);
        costasArrays[count*n+4]=(64>>RP04);
        costasArrays[count*n+5]=(64>>RP05);
        costasArrays[count*n+6]=(64>>RP06);
        count++;
        goto doReturn6;
      }
      goto begin7;
    }
returnPoint6:
    bitNum++;
  }
doReturn6:
  //  bitNum=RowPosStore[row];
  LOAD5;
  bitField=bitFieldStore[5];
  goto returnPoint5;

begin7:
  tempBitField=blankBitField;
setForbidden7:
  asm { HadBit(RP00)
      HadBit(RP01)
      HadBit(RP02)
      HadBit(RP03)
      HadBit(RP04)
      HadBit(RP05)
      HadBit(RP06)

      SetBit(RP06,RP01,RP00)
      SetBit(RP06,RP02,RP01)
      SetBit(RP06,RP03,RP02)
      SetBit(RP06,RP04,RP03)
      SetBit(RP06,RP05,RP04)  }
  if(tempBitField==-1)
    goto endSetForbidden7;
  asm { SetBit(RP06,RP06,RP05)
      SetBit(RP05,RP02,RP00)
      SetBit(RP05,RP03,RP01)
      SetBit(RP05,RP04,RP02)
      SetBit(RP05,RP05,RP03)  }
  if(tempBitField==-1)
    goto endSetForbidden7;
  asm { SetBit(RP05,RP06,RP04)
      SetBit(RP04,RP03,RP00)
      SetBit(RP04,RP04,RP01)
      SetBit(RP04,RP05,RP02)
      SetBit(RP04,RP06,RP03)  }
  if(tempBitField==-1)
    goto endSetForbidden7;
  asm { SetBit(RP03,RP04,RP00)
      SetBit(RP03,RP05,RP01)
      SetBit(RP03,RP06,RP02)
      SetBit(RP02,RP05,RP00)
      SetBit(RP02,RP06,RP01)
      SetBit(RP01,RP06,RP00)  }

endSetForbidden7:
  if(tempBitField==-1)
    goto returnPoint6;
  bitField=tempBitField;
  bitFieldStore[7]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE7;

      if(n==8)      //record layout!
      {
        if(RP00>=n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        costasArrays[count*n+7]=(1<<RP07);
        count++;
        costasArrays[count*n]=(128>>RP00);
        costasArrays[count*n+1]=(128>>RP01);
        costasArrays[count*n+2]=(128>>RP02);
        costasArrays[count*n+3]=(128>>RP03);
        costasArrays[count*n+4]=(128>>RP04);
        costasArrays[count*n+5]=(128>>RP05);
        costasArrays[count*n+6]=(128>>RP06);
        costasArrays[count*n+7]=(128>>RP07);
        count++;
        goto doReturn7;
      }
      goto begin8;
    }
returnPoint7:
    bitNum++;
  }
doReturn7:
  //  bitNum=RowPosStore[row];
  LOAD6;
  bitField=bitFieldStore[6];
  goto returnPoint6;

begin8:
  tempBitField=blankBitField;
setForbidden8:
  asm { HadBit(RP00)
      HadBit(RP01)
      HadBit(RP02)
      HadBit(RP03)
      HadBit(RP04)
      HadBit(RP05)
      HadBit(RP06)
      HadBit(RP07)

      SetBit(RP07,RP01,RP00)
      SetBit(RP07,RP02,RP01)
      SetBit(RP07,RP03,RP02)
      SetBit(RP07,RP04,RP03)
      SetBit(RP07,RP05,RP04)  }
  if(tempBitField==-1)
    goto endSetForbidden8;
   asm {  SetBit(RP07,RP06,RP05)
      SetBit(RP07,RP07,RP06)
      SetBit(RP06,RP02,RP00)
      SetBit(RP06,RP03,RP01)
      SetBit(RP06,RP04,RP02)    }
  if(tempBitField==-1)
    goto endSetForbidden8;
  asm { SetBit(RP06,RP05,RP03)
      SetBit(RP06,RP06,RP04)
      SetBit(RP06,RP07,RP05)
      SetBit(RP05,RP03,RP00)
      SetBit(RP05,RP04,RP01)    }
  if(tempBitField==-1)
    goto endSetForbidden8;
  asm { SetBit(RP05,RP05,RP02)
      SetBit(RP05,RP06,RP03)
      SetBit(RP05,RP07,RP04)
      SetBit(RP04,RP04,RP00)
      SetBit(RP04,RP05,RP01)    }
  if(tempBitField==-1)
    goto endSetForbidden8;
  asm { SetBit(RP04,RP06,RP02)
      SetBit(RP04,RP07,RP03)
      SetBit(RP03,RP05,RP00)
      SetBit(RP03,RP06,RP01)    }
  if(tempBitField==-1)
    goto endSetForbidden8;
  asm { SetBit(RP03,RP07,RP02)
      SetBit(RP02,RP06,RP00)
      SetBit(RP02,RP07,RP01)
      SetBit(RP01,RP07,RP00)    }

endSetForbidden8:
  if(tempBitField==-1)
    goto returnPoint7;
  bitField=tempBitField;
  bitFieldStore[8]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE8;

      if(n==9)      //record layout!
      {
        if(RP01>n/2 && RP00==n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        costasArrays[count*n+7]=(1<<RP07);
        costasArrays[count*n+8]=(1<<RP08);
        count++;
        costasArrays[count*n]=(256>>RP00);
        costasArrays[count*n+1]=(256>>RP01);
        costasArrays[count*n+2]=(256>>RP02);
        costasArrays[count*n+3]=(256>>RP03);
        costasArrays[count*n+4]=(256>>RP04);
        costasArrays[count*n+5]=(256>>RP05);
        costasArrays[count*n+6]=(256>>RP06);
        costasArrays[count*n+7]=(256>>RP07);
        costasArrays[count*n+8]=(256>>RP08);
        count++;
        goto doReturn8;
      }
      goto begin9;
    }
returnPoint8:
    bitNum++;
  }
doReturn8:
  //  bitNum=RowPosStore[row];
  LOAD7;
  bitField=bitFieldStore[7];
  goto returnPoint7;

begin9:
  tempBitField=blankBitField;
setForbidden9:
  asm { HadBit(RP00)}
  asm { HadBit(RP01)}
  asm { HadBit(RP02)}
  asm { HadBit(RP03)}
  asm { HadBit(RP04)}
  asm { HadBit(RP05)}
  asm { HadBit(RP06)}
  asm { HadBit(RP07)}
  asm {HadBit(RP08)}

  asm { SetBit(RP08,RP01,RP00)  }
  asm { SetBit(RP08,RP02,RP01)  }
  asm { SetBit(RP08,RP03,RP02)  }
  asm { SetBit(RP08,RP04,RP03)  }
  asm { SetBit(RP08,RP05,RP04)  }
    if(tempBitField==-1)
      goto endSetForbidden9;
  asm { SetBit(RP08,RP06,RP05)  }
  asm { SetBit(RP08,RP07,RP06)  }
  asm { SetBit(RP08,RP08,RP07)  }
  asm { SetBit(RP07,RP02,RP00)  }
  asm { SetBit(RP07,RP03,RP01)  }
    if(tempBitField==-1)
      goto endSetForbidden9;
  asm { SetBit(RP07,RP04,RP02)  }
  asm { SetBit(RP07,RP05,RP03)  }
  asm { SetBit(RP07,RP06,RP04)  }
  asm { SetBit(RP07,RP07,RP05)  }
  asm { SetBit(RP07,RP08,RP06)  }
    if(tempBitField==-1)
      goto endSetForbidden9;
  asm { SetBit(RP06,RP03,RP00)  }
  asm { SetBit(RP06,RP04,RP01)  }
  asm { SetBit(RP06,RP05,RP02)  }
  asm { SetBit(RP06,RP06,RP03)  }
  asm { SetBit(RP06,RP07,RP04)  }
    if(tempBitField==-1)
      goto endSetForbidden9;
  asm { SetBit(RP06,RP08,RP05)  }
  asm { SetBit(RP05,RP04,RP00)  }
  asm { SetBit(RP05,RP05,RP01)  }
  asm { SetBit(RP05,RP06,RP02)  }
  asm { SetBit(RP05,RP07,RP03)  }
    if(tempBitField==-1)
      goto endSetForbidden9;
  asm { SetBit(RP05,RP08,RP04)  }
  asm { SetBit(RP04,RP05,RP00)  }
  asm { SetBit(RP04,RP06,RP01)  }
  asm { SetBit(RP04,RP07,RP02)  }
  asm { SetBit(RP04,RP08,RP03)  }
    if(tempBitField==-1)
      goto endSetForbidden9;
  asm { SetBit(RP03,RP06,RP00)  }
  asm { SetBit(RP03,RP07,RP01)  }
  asm { SetBit(RP03,RP08,RP02)  }
  asm { SetBit(RP02,RP07,RP00)  }
  asm { SetBit(RP02,RP08,RP01)  }
  asm { SetBit(RP01,RP08,RP00)  }

endSetForbidden9:
  if(tempBitField==-1)
    goto returnPoint8;
  bitField=tempBitField;
  bitFieldStore[9]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE9;

      if(n==10)     //record layout!
      {
        if(RP00>=n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        costasArrays[count*n+7]=(1<<RP07);
        costasArrays[count*n+8]=(1<<RP08);
        costasArrays[count*n+9]=(1<<RP09);
        count++;
        costasArrays[count*n]=(512>>RP00);
        costasArrays[count*n+1]=(512>>RP01);
        costasArrays[count*n+2]=(512>>RP02);
        costasArrays[count*n+3]=(512>>RP03);
        costasArrays[count*n+4]=(512>>RP04);
        costasArrays[count*n+5]=(512>>RP05);
        costasArrays[count*n+6]=(512>>RP06);
        costasArrays[count*n+7]=(512>>RP07);
        costasArrays[count*n+8]=(512>>RP08);
        costasArrays[count*n+9]=(512>>RP09);
        count++;
        goto doReturn9;
      }
      goto begin10;
    }
returnPoint9:
    bitNum++;
  }
doReturn9:
  //  bitNum=RowPosStore[row];
  LOAD8;
  bitField=bitFieldStore[8];
  goto returnPoint8;

begin10:
  tempBitField=blankBitField;
setForbidden10:
  asm { HadBit(RP00)}
  asm { HadBit(RP01)}
  asm { HadBit(RP02)}
  asm { HadBit(RP03)}
  asm { HadBit(RP04)}
  asm { HadBit(RP05)}
  asm { HadBit(RP06)}
  asm { HadBit(RP07)}
  asm { HadBit(RP08)}
  asm {HadBit(RP09)}

  asm { SetBit(RP09,RP01,RP00)  }
  asm { SetBit(RP09,RP02,RP01)  }
  asm { SetBit(RP09,RP03,RP02)  }
  asm { SetBit(RP09,RP04,RP03)  }
  asm { SetBit(RP09,RP05,RP04)  }
    if(tempBitField==-1)
      goto endSetForbidden10;
  asm { SetBit(RP09,RP06,RP05)  }
  asm { SetBit(RP09,RP07,RP06)  }
  asm { SetBit(RP09,RP08,RP07)  }
  asm { SetBit(RP09,RP09,RP08)  }
  asm { SetBit(RP08,RP02,RP00)  }
    if(tempBitField==-1)
      goto endSetForbidden10;
  asm { SetBit(RP08,RP03,RP01)  }
  asm { SetBit(RP08,RP04,RP02)  }
  asm { SetBit(RP08,RP05,RP03)  }
  asm { SetBit(RP08,RP06,RP04)  }
  asm { SetBit(RP08,RP07,RP05)  }
    if(tempBitField==-1)
      goto endSetForbidden10;
  asm { SetBit(RP08,RP08,RP06)  }
  asm { SetBit(RP08,RP09,RP07)  }
  asm { SetBit(RP07,RP03,RP00)  }
  asm { SetBit(RP07,RP04,RP01)  }
  asm { SetBit(RP07,RP05,RP02)  }
    if(tempBitField==-1)
      goto endSetForbidden10;
  asm { SetBit(RP07,RP06,RP03)  }
  asm { SetBit(RP07,RP07,RP04)  }
  asm { SetBit(RP07,RP08,RP05)  }
  asm { SetBit(RP07,RP09,RP06)  }
  asm { SetBit(RP06,RP04,RP00)  }
    if(tempBitField==-1)
      goto endSetForbidden10;
  asm { SetBit(RP06,RP05,RP01)  }
  asm { SetBit(RP06,RP06,RP02)  }
  asm { SetBit(RP06,RP07,RP03)  }
  asm { SetBit(RP06,RP08,RP04)  }
  asm { SetBit(RP06,RP09,RP05)  }
    if(tempBitField==-1)
      goto endSetForbidden10;
  asm { SetBit(RP05,RP05,RP00)  }
  asm { SetBit(RP05,RP06,RP01)  }
  asm { SetBit(RP05,RP07,RP02)  }
  asm { SetBit(RP05,RP08,RP03)  }
  asm { SetBit(RP05,RP09,RP04)  }
    if(tempBitField==-1)
      goto endSetForbidden10;
  asm { SetBit(RP04,RP06,RP00)  }
  asm { SetBit(RP04,RP07,RP01)  }
  asm { SetBit(RP04,RP08,RP02)  }
  asm { SetBit(RP04,RP09,RP03)  }
  asm { SetBit(RP03,RP07,RP00)  }
    if(tempBitField==-1)
      goto endSetForbidden10;
  asm { SetBit(RP03,RP08,RP01)  }
  asm { SetBit(RP03,RP09,RP02)  }
  asm { SetBit(RP02,RP08,RP00)  }
  asm { SetBit(RP02,RP09,RP01)  }
  asm { SetBit(RP01,RP09,RP00)  }

endSetForbidden10:
  if(tempBitField==-1)
    goto returnPoint9;

  bitField=tempBitField;
  bitFieldStore[10]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE10;

      if(n==11)     //record layout!
      {
        if(RP01>n/2 && RP00==n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        costasArrays[count*n+7]=(1<<RP07);
        costasArrays[count*n+8]=(1<<RP08);
        costasArrays[count*n+9]=(1<<RP09);
        costasArrays[count*n+10]=(1<<RP10);
        count++;
        costasArrays[count*n]=(1024>>RP00);
        costasArrays[count*n+1]=(1024>>RP01);
        costasArrays[count*n+2]=(1024>>RP02);
        costasArrays[count*n+3]=(1024>>RP03);
        costasArrays[count*n+4]=(1024>>RP04);
        costasArrays[count*n+5]=(1024>>RP05);
        costasArrays[count*n+6]=(1024>>RP06);
        costasArrays[count*n+7]=(1024>>RP07);
        costasArrays[count*n+8]=(1024>>RP08);
        costasArrays[count*n+9]=(1024>>RP09);
        costasArrays[count*n+10]=(1024>>RP10);
        count++;
        goto doReturn10;
      }
      goto begin11;
    }
returnPoint10:
    bitNum++;
  }
doReturn10:
  //  bitNum=RowPosStore[row];
  LOAD9;
  bitField=bitFieldStore[9];
  goto returnPoint9;

begin11:
  tempBitField=blankBitField;
setForbidden11:
  asm { HadBit(RP00)}
  asm { HadBit(RP01)}
  asm { HadBit(RP02)}
  asm { HadBit(RP03)}
  asm { HadBit(RP04)}
  asm { HadBit(RP05)}
  asm { HadBit(RP06)}
  asm { HadBit(RP07)}
  asm { HadBit(RP08)}
  asm { HadBit(RP09)}
  asm {HadBit(RP10)}

  asm { SetBit(RP10,RP01,RP00)  }
  asm { SetBit(RP10,RP02,RP01)  }
  asm { SetBit(RP10,RP03,RP02)  }
  asm { SetBit(RP10,RP04,RP03)  }
  asm { SetBit(RP10,RP05,RP04)  }
  if(tempBitField==-1) goto endSetForbidden11;
  asm { SetBit(RP10,RP06,RP05)  }
  asm { SetBit(RP10,RP07,RP06)  }
  asm { SetBit(RP10,RP08,RP07)  }
  asm { SetBit(RP10,RP09,RP08)  }
  asm { SetBit(RP10,RP10,RP09)  }
  if(tempBitField==-1) goto endSetForbidden11;
  asm { SetBit(RP09,RP02,RP00)  }
  asm { SetBit(RP09,RP03,RP01)  }
  asm { SetBit(RP09,RP04,RP02)  }
  asm { SetBit(RP09,RP05,RP03)  }
  asm { SetBit(RP09,RP06,RP04)  }
  if(tempBitField==-1) goto endSetForbidden11;
  asm { SetBit(RP09,RP07,RP05)  }
  asm { SetBit(RP09,RP08,RP06)  }
  asm { SetBit(RP09,RP09,RP07)  }
  asm { SetBit(RP09,RP10,RP08)  }
  asm { SetBit(RP08,RP03,RP00)  }
  if(tempBitField==-1) goto endSetForbidden11;
  asm { SetBit(RP08,RP04,RP01)  }
  asm { SetBit(RP08,RP05,RP02)  }
  asm { SetBit(RP08,RP06,RP03)  }
  asm { SetBit(RP08,RP07,RP04)  }
  asm { SetBit(RP08,RP08,RP05)  }
  if(tempBitField==-1) goto endSetForbidden11;
  asm { SetBit(RP08,RP09,RP06)  }
  asm { SetBit(RP08,RP10,RP07)  }
  asm { SetBit(RP07,RP04,RP00)  }
  asm { SetBit(RP07,RP05,RP01)  }
  asm { SetBit(RP07,RP06,RP02)  }
  if(tempBitField==-1) goto endSetForbidden11;
  asm { SetBit(RP07,RP07,RP03)  }
  asm { SetBit(RP07,RP08,RP04)  }
  asm { SetBit(RP07,RP09,RP05)  }
  asm { SetBit(RP07,RP10,RP06)  }
  asm { SetBit(RP06,RP05,RP00)  }
  if(tempBitField==-1) goto endSetForbidden11;
  asm { SetBit(RP06,RP06,RP01)  }
  asm { SetBit(RP06,RP07,RP02)  }
  asm { SetBit(RP06,RP08,RP03)  }
  asm { SetBit(RP06,RP09,RP04)  }
  asm { SetBit(RP06,RP10,RP05)  }
  if(tempBitField==-1) goto endSetForbidden11;
  asm { SetBit(RP05,RP06,RP00)  }
  asm { SetBit(RP05,RP07,RP01)  }
  asm { SetBit(RP05,RP08,RP02)  }
  asm { SetBit(RP05,RP09,RP03)  }
  asm { SetBit(RP05,RP10,RP04)  }
  if(tempBitField==-1) goto endSetForbidden11;
  asm { SetBit(RP04,RP07,RP00)  }
  asm { SetBit(RP04,RP08,RP01)  }
  asm { SetBit(RP04,RP09,RP02)  }
  asm { SetBit(RP04,RP10,RP03)  }
  asm { SetBit(RP03,RP08,RP00)  }
  if(tempBitField==-1) goto endSetForbidden11;
  asm { SetBit(RP03,RP09,RP01)  }
  asm { SetBit(RP03,RP10,RP02)  }
  asm { SetBit(RP02,RP09,RP00)  }
  asm { SetBit(RP02,RP10,RP01)  }
  asm { SetBit(RP01,RP10,RP00)  }

endSetForbidden11:
  if(tempBitField==-1)
    goto returnPoint10;

  bitField=tempBitField;
  bitFieldStore[11]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE11;

      if(n==12)     //record layout!
      {
        if(RP00>=n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        costasArrays[count*n+7]=(1<<RP07);
        costasArrays[count*n+8]=(1<<RP08);
        costasArrays[count*n+9]=(1<<RP09);
        costasArrays[count*n+10]=(1<<RP10);
        costasArrays[count*n+11]=(1<<RP11);
        count++;
        costasArrays[count*n]=(2048>>RP00);
        costasArrays[count*n+1]=(2048>>RP01);
        costasArrays[count*n+2]=(2048>>RP02);
        costasArrays[count*n+3]=(2048>>RP03);
        costasArrays[count*n+4]=(2048>>RP04);
        costasArrays[count*n+5]=(2048>>RP05);
        costasArrays[count*n+6]=(2048>>RP06);
        costasArrays[count*n+7]=(2048>>RP07);
        costasArrays[count*n+8]=(2048>>RP08);
        costasArrays[count*n+9]=(2048>>RP09);
        costasArrays[count*n+10]=(2048>>RP10);
        costasArrays[count*n+11]=(2048>>RP11);
        count++;
        goto doReturn11;
      }
      goto begin12;
    }
returnPoint11:
    bitNum++;
  }
doReturn11:
  //  bitNum=RowPosStore[row];
  LOAD10;
  bitField=bitFieldStore[10];
  goto returnPoint10;

begin12:
  tempBitField=blankBitField;
setForbidden12:
  asm { HadBit(RP00)}
  asm { HadBit(RP01)}
  asm { HadBit(RP02)}
  asm { HadBit(RP03)}
  asm { HadBit(RP04)}
  asm { HadBit(RP05)}
  asm { HadBit(RP06)}
  asm { HadBit(RP07)}
  asm { HadBit(RP08)}
  asm { HadBit(RP09)}
  asm {HadBit(RP10)}
  asm {HadBit(RP11)}

  asm { SetBit(RP11,RP01,RP00)  }
  asm { SetBit(RP11,RP02,RP01)  }
  asm { SetBit(RP11,RP03,RP02)  }
  asm { SetBit(RP11,RP04,RP03)  }
  asm { SetBit(RP11,RP05,RP04)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP11,RP06,RP05)  }
  asm { SetBit(RP11,RP07,RP06)  }
  asm { SetBit(RP11,RP08,RP07)  }
  asm { SetBit(RP11,RP09,RP08)  }
  asm { SetBit(RP11,RP10,RP09)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP11,RP11,RP10)  }
  asm { SetBit(RP10,RP02,RP00)  }
  asm { SetBit(RP10,RP03,RP01)  }
  asm { SetBit(RP10,RP04,RP02)  }
  asm { SetBit(RP10,RP05,RP03)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP10,RP06,RP04)  }
  asm { SetBit(RP10,RP07,RP05)  }
  asm { SetBit(RP10,RP08,RP06)  }
  asm { SetBit(RP10,RP09,RP07)  }
  asm { SetBit(RP10,RP10,RP08)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP10,RP11,RP09)  }
  asm { SetBit(RP09,RP03,RP00)  }
  asm { SetBit(RP09,RP04,RP01)  }
  asm { SetBit(RP09,RP05,RP02)  }
  asm { SetBit(RP09,RP06,RP03)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP09,RP07,RP04)  }
  asm { SetBit(RP09,RP08,RP05)  }
  asm { SetBit(RP09,RP09,RP06)  }
  asm { SetBit(RP09,RP10,RP07)  }
  asm { SetBit(RP09,RP11,RP08)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP08,RP04,RP00)  }
  asm { SetBit(RP08,RP05,RP01)  }
  asm { SetBit(RP08,RP06,RP02)  }
  asm { SetBit(RP08,RP07,RP03)  }
  asm { SetBit(RP08,RP08,RP04)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP08,RP09,RP05)  }
  asm { SetBit(RP08,RP10,RP06)  }
  asm { SetBit(RP08,RP11,RP07)  }
  asm { SetBit(RP07,RP05,RP00)  }
  asm { SetBit(RP07,RP06,RP01)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP07,RP07,RP02)  }
  asm { SetBit(RP07,RP08,RP03)  }
  asm { SetBit(RP07,RP09,RP04)  }
  asm { SetBit(RP07,RP10,RP05)  }
  asm { SetBit(RP07,RP11,RP06)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP06,RP06,RP00)  }
  asm { SetBit(RP06,RP07,RP01)  }
  asm { SetBit(RP06,RP08,RP02)  }
  asm { SetBit(RP06,RP09,RP03)  }
  asm { SetBit(RP06,RP10,RP04)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP06,RP11,RP05)  }
  asm { SetBit(RP05,RP07,RP00)  }
  asm { SetBit(RP05,RP08,RP01)  }
  asm { SetBit(RP05,RP09,RP02)  }
  asm { SetBit(RP05,RP10,RP03)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP05,RP11,RP04)  }
  asm { SetBit(RP04,RP08,RP00)  }
  asm { SetBit(RP04,RP09,RP01)  }
  asm { SetBit(RP04,RP10,RP02)  }
  asm { SetBit(RP04,RP11,RP03)  }
  if(tempBitField==-1) goto endSetForbidden12;
  asm { SetBit(RP03,RP09,RP00)  }
  asm { SetBit(RP03,RP10,RP01)  }
  asm { SetBit(RP03,RP11,RP02)  }
  asm { SetBit(RP02,RP10,RP00)  }
  asm { SetBit(RP02,RP11,RP01)  }
  asm { SetBit(RP01,RP11,RP00)  }

endSetForbidden12:
  if(tempBitField==-1)
    goto returnPoint11;

  bitField=tempBitField;
  bitFieldStore[12]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE12;

      if(n==13)     //record layout!
      {
        if(RP01>n/2 && RP00==n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        costasArrays[count*n+7]=(1<<RP07);
        costasArrays[count*n+8]=(1<<RP08);
        costasArrays[count*n+9]=(1<<RP09);
        costasArrays[count*n+10]=(1<<RP10);
        costasArrays[count*n+11]=(1<<RP11);
        costasArrays[count*n+12]=(1<<RP12);
        count++;
        costasArrays[count*n]=(4096>>RP00);
        costasArrays[count*n+1]=(4096>>RP01);
        costasArrays[count*n+2]=(4096>>RP02);
        costasArrays[count*n+3]=(4096>>RP03);
        costasArrays[count*n+4]=(4096>>RP04);
        costasArrays[count*n+5]=(4096>>RP05);
        costasArrays[count*n+6]=(4096>>RP06);
        costasArrays[count*n+7]=(4096>>RP07);
        costasArrays[count*n+8]=(4096>>RP08);
        costasArrays[count*n+9]=(4096>>RP09);
        costasArrays[count*n+10]=(4096>>RP10);
        costasArrays[count*n+11]=(4096>>RP11);
        costasArrays[count*n+12]=(4096>>RP12);
        count++;
        goto doReturn12;
      }
      goto begin13;
    }
returnPoint12:
    bitNum++;
  }
doReturn12:
  //  bitNum=RowPosStore[row];
  LOAD11;
  bitField=bitFieldStore[11];
  goto returnPoint11;

begin13:
  tempBitField=blankBitField;
setForbidden13:
  asm { HadBit(RP00)}
  asm { HadBit(RP01)}
  asm { HadBit(RP02)}
  asm { HadBit(RP03)}
  asm { HadBit(RP04)}
  asm { HadBit(RP05)}
  asm { HadBit(RP06)}
  asm { HadBit(RP07)}
  asm { HadBit(RP08)}
  asm { HadBit(RP09)}
  asm { HadBit(RP10)}
  asm { HadBit(RP11)}
  asm { HadBit(RP12)}
  asm { SetBit(RP12,RP01,RP00)  }
  asm { SetBit(RP12,RP02,RP01)  }
  asm { SetBit(RP12,RP03,RP02)  }
  asm { SetBit(RP12,RP04,RP03)  }
  asm { SetBit(RP12,RP05,RP04)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP12,RP06,RP05)  }
  asm { SetBit(RP12,RP07,RP06)  }
  asm { SetBit(RP12,RP08,RP07)  }
  asm { SetBit(RP12,RP09,RP08)  }
  asm { SetBit(RP12,RP10,RP09)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP12,RP11,RP10)  }
  asm { SetBit(RP12,RP12,RP11)  }
  asm { SetBit(RP11,RP02,RP00)  }
  asm { SetBit(RP11,RP03,RP01)  }
  asm { SetBit(RP11,RP04,RP02)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP11,RP05,RP03)  }
  asm { SetBit(RP11,RP06,RP04)  }
  asm { SetBit(RP11,RP07,RP05)  }
  asm { SetBit(RP11,RP08,RP06)  }
  asm { SetBit(RP11,RP09,RP07)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP11,RP10,RP08)  }
  asm { SetBit(RP11,RP11,RP09)  }
  asm { SetBit(RP11,RP12,RP10)  }
  asm { SetBit(RP10,RP03,RP00)  }
  asm { SetBit(RP10,RP04,RP01)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP10,RP05,RP02)  }
  asm { SetBit(RP10,RP06,RP03)  }
  asm { SetBit(RP10,RP07,RP04)  }
  asm { SetBit(RP10,RP08,RP05)  }
  asm { SetBit(RP10,RP09,RP06)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP10,RP10,RP07)  }
  asm { SetBit(RP10,RP11,RP08)  }
  asm { SetBit(RP10,RP12,RP09)  }
  asm { SetBit(RP09,RP04,RP00)  }
  asm { SetBit(RP09,RP05,RP01)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP09,RP06,RP02)  }
  asm { SetBit(RP09,RP07,RP03)  }
  asm { SetBit(RP09,RP08,RP04)  }
  asm { SetBit(RP09,RP09,RP05)  }
  asm { SetBit(RP09,RP10,RP06)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP09,RP11,RP07)  }
  asm { SetBit(RP09,RP12,RP08)  }
  asm { SetBit(RP08,RP05,RP00)  }
  asm { SetBit(RP08,RP06,RP01)  }
  asm { SetBit(RP08,RP07,RP02)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP08,RP08,RP03)  }
  asm { SetBit(RP08,RP09,RP04)  }
  asm { SetBit(RP08,RP10,RP05)  }
  asm { SetBit(RP08,RP11,RP06)  }
  asm { SetBit(RP08,RP12,RP07)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP07,RP06,RP00)  }
  asm { SetBit(RP07,RP07,RP01)  }
  asm { SetBit(RP07,RP08,RP02)  }
  asm { SetBit(RP07,RP09,RP03)  }
  asm { SetBit(RP07,RP10,RP04)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP07,RP11,RP05)  }
  asm { SetBit(RP07,RP12,RP06)  }
  asm { SetBit(RP06,RP07,RP00)  }
  asm { SetBit(RP06,RP08,RP01)  }
  asm { SetBit(RP06,RP09,RP02)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP06,RP10,RP03)  }
  asm { SetBit(RP06,RP11,RP04)  }
  asm { SetBit(RP06,RP12,RP05)  }
  asm { SetBit(RP05,RP08,RP00)  }
  asm { SetBit(RP05,RP09,RP01)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP05,RP10,RP02)  }
  asm { SetBit(RP05,RP11,RP03)  }
  asm { SetBit(RP05,RP12,RP04)  }
  asm { SetBit(RP04,RP09,RP00)  }
  asm { SetBit(RP04,RP10,RP01)  }
  asm { SetBit(RP04,RP11,RP02)  }
  if(tempBitField==-1) goto endSetForbidden13;
  asm { SetBit(RP04,RP12,RP03)  }
  asm { SetBit(RP03,RP10,RP00)  }
  asm { SetBit(RP03,RP11,RP01)  }
  asm { SetBit(RP03,RP12,RP02)  }
  asm { SetBit(RP02,RP11,RP00)  }
  asm { SetBit(RP02,RP12,RP01)  }
  asm { SetBit(RP01,RP12,RP00)  }

endSetForbidden13:

  if(tempBitField==-1)
    goto returnPoint12;

  bitField=tempBitField;
  bitFieldStore[13]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE13;

      if(n==14)     //record layout!
      {
        if(RP00>=n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        costasArrays[count*n+7]=(1<<RP07);
        costasArrays[count*n+8]=(1<<RP08);
        costasArrays[count*n+9]=(1<<RP09);
        costasArrays[count*n+10]=(1<<RP10);
        costasArrays[count*n+11]=(1<<RP11);
        costasArrays[count*n+12]=(1<<RP12);
        costasArrays[count*n+13]=(1<<RP13);
        count++;
        costasArrays[count*n]=(8192>>RP00);
        costasArrays[count*n+1]=(8192>>RP01);
        costasArrays[count*n+2]=(8192>>RP02);
        costasArrays[count*n+3]=(8192>>RP03);
        costasArrays[count*n+4]=(8192>>RP04);
        costasArrays[count*n+5]=(8192>>RP05);
        costasArrays[count*n+6]=(8192>>RP06);
        costasArrays[count*n+7]=(8192>>RP07);
        costasArrays[count*n+8]=(8192>>RP08);
        costasArrays[count*n+9]=(8192>>RP09);
        costasArrays[count*n+10]=(8192>>RP10);
        costasArrays[count*n+11]=(8192>>RP11);
        costasArrays[count*n+12]=(8192>>RP12);
        costasArrays[count*n+13]=(8192>>RP13);
        count++;
        goto doReturn13;
      }
      goto begin14;
    }
returnPoint13:
    bitNum++;
  }
doReturn13:
  //  bitNum=RowPosStore[row];
  LOAD12;
  bitField=bitFieldStore[12];
  goto returnPoint12;

begin14:
  tempBitField=blankBitField;
setForbidden14:
  asm { HadBit(RP00)}
  asm { HadBit(RP01)}
  asm { HadBit(RP02)}
  asm { HadBit(RP03)}
  asm { HadBit(RP04)}
  asm { HadBit(RP05)}
  asm { HadBit(RP06)}
  asm { HadBit(RP07)}
  asm { HadBit(RP08)}
  asm { HadBit(RP09)}
  asm { HadBit(RP10)}
  asm { HadBit(RP11)}
  asm { HadBit(RP12)}
  asm { HadBit(RP13)}
  asm { SetBit(RP13,RP01,RP00)  }
  asm { SetBit(RP13,RP02,RP01)  }
  asm { SetBit(RP13,RP03,RP02)  }
  asm { SetBit(RP13,RP04,RP03)  }
  asm { SetBit(RP13,RP05,RP04)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP13,RP06,RP05)  }
  asm { SetBit(RP13,RP07,RP06)  }
  asm { SetBit(RP13,RP08,RP07)  }
  asm { SetBit(RP13,RP09,RP08)  }
  asm { SetBit(RP13,RP10,RP09)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP13,RP11,RP10)  }
  asm { SetBit(RP13,RP12,RP11)  }
  asm { SetBit(RP13,RP13,RP12)  }
  asm { SetBit(RP12,RP02,RP00)  }
  asm { SetBit(RP12,RP03,RP01)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP12,RP04,RP02)  }
  asm { SetBit(RP12,RP05,RP03)  }
  asm { SetBit(RP12,RP06,RP04)  }
  asm { SetBit(RP12,RP07,RP05)  }
  asm { SetBit(RP12,RP08,RP06)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP12,RP09,RP07)  }
  asm { SetBit(RP12,RP10,RP08)  }
  asm { SetBit(RP12,RP11,RP09)  }
  asm { SetBit(RP12,RP12,RP10)  }
  asm { SetBit(RP12,RP13,RP11)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP11,RP03,RP00)  }
  asm { SetBit(RP11,RP04,RP01)  }
  asm { SetBit(RP11,RP05,RP02)  }
  asm { SetBit(RP11,RP06,RP03)  }
  asm { SetBit(RP11,RP07,RP04)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP11,RP08,RP05)  }
  asm { SetBit(RP11,RP09,RP06)  }
  asm { SetBit(RP11,RP10,RP07)  }
  asm { SetBit(RP11,RP11,RP08)  }
  asm { SetBit(RP11,RP12,RP09)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP11,RP13,RP10)  }
  asm { SetBit(RP10,RP04,RP00)  }
  asm { SetBit(RP10,RP05,RP01)  }
  asm { SetBit(RP10,RP06,RP02)  }
  asm { SetBit(RP10,RP07,RP03)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP10,RP08,RP04)  }
  asm { SetBit(RP10,RP09,RP05)  }
  asm { SetBit(RP10,RP10,RP06)  }
  asm { SetBit(RP10,RP11,RP07)  }
  asm { SetBit(RP10,RP12,RP08)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP10,RP13,RP09)  }
  asm { SetBit(RP09,RP05,RP00)  }
  asm { SetBit(RP09,RP06,RP01)  }
  asm { SetBit(RP09,RP07,RP02)  }
  asm { SetBit(RP09,RP08,RP03)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP09,RP09,RP04)  }
  asm { SetBit(RP09,RP10,RP05)  }
  asm { SetBit(RP09,RP11,RP06)  }
  asm { SetBit(RP09,RP12,RP07)  }
  asm { SetBit(RP09,RP13,RP08)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP08,RP06,RP00)  }
  asm { SetBit(RP08,RP07,RP01)  }
  asm { SetBit(RP08,RP08,RP02)  }
  asm { SetBit(RP08,RP09,RP03)  }
  asm { SetBit(RP08,RP10,RP04)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP08,RP11,RP05)  }
  asm { SetBit(RP08,RP12,RP06)  }
  asm { SetBit(RP08,RP13,RP07)  }
  asm { SetBit(RP07,RP07,RP00)  }
  asm { SetBit(RP07,RP08,RP01)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP07,RP09,RP02)  }
  asm { SetBit(RP07,RP10,RP03)  }
  asm { SetBit(RP07,RP11,RP04)  }
  asm { SetBit(RP07,RP12,RP05)  }
  asm { SetBit(RP07,RP13,RP06)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP06,RP08,RP00)  }
  asm { SetBit(RP06,RP09,RP01)  }
  asm { SetBit(RP06,RP10,RP02)  }
  asm { SetBit(RP06,RP11,RP03)  }
  asm { SetBit(RP06,RP12,RP04)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP06,RP13,RP05)  }
  asm { SetBit(RP05,RP09,RP00)  }
  asm { SetBit(RP05,RP10,RP01)  }
  asm { SetBit(RP05,RP11,RP02)  }
  asm { SetBit(RP05,RP12,RP03)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP05,RP13,RP04)  }
  asm { SetBit(RP04,RP10,RP00)  }
  asm { SetBit(RP04,RP11,RP01)  }
  asm { SetBit(RP04,RP12,RP02)  }
  asm { SetBit(RP04,RP13,RP03)  }
  if(tempBitField==-1) goto endSetForbidden14;
  asm { SetBit(RP03,RP11,RP00)  }
  asm { SetBit(RP03,RP12,RP01)  }
  asm { SetBit(RP03,RP13,RP02)  }
  asm { SetBit(RP02,RP12,RP00)  }
  asm { SetBit(RP02,RP13,RP01)  }
  asm { SetBit(RP01,RP13,RP00)  }

endSetForbidden14:

  if(tempBitField==-1)
    goto returnPoint13;

  bitField=tempBitField;
  bitFieldStore[14]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE14;

      if(n==15)     //record layout!
      {
        if(RP01>n/2 && RP00==n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        costasArrays[count*n+7]=(1<<RP07);
        costasArrays[count*n+8]=(1<<RP08);
        costasArrays[count*n+9]=(1<<RP09);
        costasArrays[count*n+10]=(1<<RP10);
        costasArrays[count*n+11]=(1<<RP11);
        costasArrays[count*n+12]=(1<<RP12);
        costasArrays[count*n+13]=(1<<RP13);
        costasArrays[count*n+14]=(1<<RP14);
        count++;
        costasArrays[count*n]=(16384>>RP00);
        costasArrays[count*n+1]=(16384>>RP01);
        costasArrays[count*n+2]=(16384>>RP02);
        costasArrays[count*n+3]=(16384>>RP03);
        costasArrays[count*n+4]=(16384>>RP04);
        costasArrays[count*n+5]=(16384>>RP05);
        costasArrays[count*n+6]=(16384>>RP06);
        costasArrays[count*n+7]=(16384>>RP07);
        costasArrays[count*n+8]=(16384>>RP08);
        costasArrays[count*n+9]=(16384>>RP09);
        costasArrays[count*n+10]=(16384>>RP10);
        costasArrays[count*n+11]=(16384>>RP11);
        costasArrays[count*n+12]=(16384>>RP12);
        costasArrays[count*n+13]=(16384>>RP13);
        costasArrays[count*n+14]=(16384>>RP14);
        count++;
        goto doReturn14;
      }
      goto begin15;
    }
returnPoint14:
    bitNum++;
  }
doReturn14:
  //  bitNum=RowPosStore[row];
  LOAD13;
  bitField=bitFieldStore[13];
  goto returnPoint13;

begin15:
  tempBitField=blankBitField;
setForbidden15:
  asm { HadBit(RP00)}
  asm { HadBit(RP01)}
  asm { HadBit(RP02)}
  asm { HadBit(RP03)}
  asm { HadBit(RP04)}
  asm { HadBit(RP05)}
  asm { HadBit(RP06)}
  asm { HadBit(RP07)}
  asm { HadBit(RP08)}
  asm { HadBit(RP09)}
  asm { HadBit(RP10)}
  asm { HadBit(RP11)}
  asm { HadBit(RP12)}
  asm { HadBit(RP13)}
  asm { HadBit(RP14)}
  asm { SetBit(RP14,RP01,RP00)  }
  asm { SetBit(RP14,RP02,RP01)  }
  asm { SetBit(RP14,RP03,RP02)  }
  asm { SetBit(RP14,RP04,RP03)  }
  asm { SetBit(RP14,RP05,RP04)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP14,RP06,RP05)  }
  asm { SetBit(RP14,RP07,RP06)  }
  asm { SetBit(RP14,RP08,RP07)  }
  asm { SetBit(RP14,RP09,RP08)  }
  asm { SetBit(RP14,RP10,RP09)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP14,RP11,RP10)  }
  asm { SetBit(RP14,RP12,RP11)  }
  asm { SetBit(RP14,RP13,RP12)  }
  asm { SetBit(RP14,RP14,RP13)  }
  asm { SetBit(RP13,RP02,RP00)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP13,RP03,RP01)  }
  asm { SetBit(RP13,RP04,RP02)  }
  asm { SetBit(RP13,RP05,RP03)  }
  asm { SetBit(RP13,RP06,RP04)  }
  asm { SetBit(RP13,RP07,RP05)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP13,RP08,RP06)  }
  asm { SetBit(RP13,RP09,RP07)  }
  asm { SetBit(RP13,RP10,RP08)  }
  asm { SetBit(RP13,RP11,RP09)  }
  asm { SetBit(RP13,RP12,RP10)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP13,RP13,RP11)  }
  asm { SetBit(RP13,RP14,RP12)  }
  asm { SetBit(RP12,RP03,RP00)  }
  asm { SetBit(RP12,RP04,RP01)  }
  asm { SetBit(RP12,RP05,RP02)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP12,RP06,RP03)  }
  asm { SetBit(RP12,RP07,RP04)  }
  asm { SetBit(RP12,RP08,RP05)  }
  asm { SetBit(RP12,RP09,RP06)  }
  asm { SetBit(RP12,RP10,RP07)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP12,RP11,RP08)  }
  asm { SetBit(RP12,RP12,RP09)  }
  asm { SetBit(RP12,RP13,RP10)  }
  asm { SetBit(RP12,RP14,RP11)  }
  asm { SetBit(RP11,RP04,RP00)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP11,RP05,RP01)  }
  asm { SetBit(RP11,RP06,RP02)  }
  asm { SetBit(RP11,RP07,RP03)  }
  asm { SetBit(RP11,RP08,RP04)  }
  asm { SetBit(RP11,RP09,RP05)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP11,RP10,RP06)  }
  asm { SetBit(RP11,RP11,RP07)  }
  asm { SetBit(RP11,RP12,RP08)  }
  asm { SetBit(RP11,RP13,RP09)  }
  asm { SetBit(RP11,RP14,RP10)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP10,RP05,RP00)  }
  asm { SetBit(RP10,RP06,RP01)  }
  asm { SetBit(RP10,RP07,RP02)  }
  asm { SetBit(RP10,RP08,RP03)  }
  asm { SetBit(RP10,RP09,RP04)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP10,RP10,RP05)  }
  asm { SetBit(RP10,RP11,RP06)  }
  asm { SetBit(RP10,RP12,RP07)  }
  asm { SetBit(RP10,RP13,RP08)  }
  asm { SetBit(RP10,RP14,RP09)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP09,RP06,RP00)  }
  asm { SetBit(RP09,RP07,RP01)  }
  asm { SetBit(RP09,RP08,RP02)  }
  asm { SetBit(RP09,RP09,RP03)  }
  asm { SetBit(RP09,RP10,RP04)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP09,RP11,RP05)  }
  asm { SetBit(RP09,RP12,RP06)  }
  asm { SetBit(RP09,RP13,RP07)  }
  asm { SetBit(RP09,RP14,RP08)  }
  asm { SetBit(RP08,RP07,RP00)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP08,RP08,RP01)  }
  asm { SetBit(RP08,RP09,RP02)  }
  asm { SetBit(RP08,RP10,RP03)  }
  asm { SetBit(RP08,RP11,RP04)  }
  asm { SetBit(RP08,RP12,RP05)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP08,RP13,RP06)  }
  asm { SetBit(RP08,RP14,RP07)  }
  asm { SetBit(RP07,RP08,RP00)  }
  asm { SetBit(RP07,RP09,RP01)  }
  asm { SetBit(RP07,RP10,RP02)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP07,RP11,RP03)  }
  asm { SetBit(RP07,RP12,RP04)  }
  asm { SetBit(RP07,RP13,RP05)  }
  asm { SetBit(RP07,RP14,RP06)  }
  asm { SetBit(RP06,RP09,RP00)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP06,RP10,RP01)  }
  asm { SetBit(RP06,RP11,RP02)  }
  asm { SetBit(RP06,RP12,RP03)  }
  asm { SetBit(RP06,RP13,RP04)  }
  asm { SetBit(RP06,RP14,RP05)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP05,RP10,RP00)  }
  asm { SetBit(RP05,RP11,RP01)  }
  asm { SetBit(RP05,RP12,RP02)  }
  asm { SetBit(RP05,RP13,RP03)  }
  asm { SetBit(RP05,RP14,RP04)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP04,RP11,RP00)  }
  asm { SetBit(RP04,RP12,RP01)  }
  asm { SetBit(RP04,RP13,RP02)  }
  asm { SetBit(RP04,RP14,RP03)  }
  asm { SetBit(RP03,RP12,RP00)  }
  if(tempBitField==-1) goto endSetForbidden15;
  asm { SetBit(RP03,RP13,RP01)  }
  asm { SetBit(RP03,RP14,RP02)  }
  asm { SetBit(RP02,RP13,RP00)  }
  asm { SetBit(RP02,RP14,RP01)  }
  asm { SetBit(RP01,RP14,RP00)  }

endSetForbidden15:

  if(tempBitField==-1)
    goto returnPoint14;

  bitField=tempBitField;
  bitFieldStore[15]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;
      STORE15;

      if(n==16)     //record layout!
      {
        if(RP00>=n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        costasArrays[count*n+7]=(1<<RP07);
        costasArrays[count*n+8]=(1<<RP08);
        costasArrays[count*n+9]=(1<<RP09);
        costasArrays[count*n+10]=(1<<RP10);
        costasArrays[count*n+11]=(1<<RP11);
        costasArrays[count*n+12]=(1<<RP12);
        costasArrays[count*n+13]=(1<<RP13);
        costasArrays[count*n+14]=(1<<RP14);
        costasArrays[count*n+15]=(1<<RP15);
        count++;
        costasArrays[count*n]=(32768>>RP00);
        costasArrays[count*n+1]=(32768>>RP01);
        costasArrays[count*n+2]=(32768>>RP02);
        costasArrays[count*n+3]=(32768>>RP03);
        costasArrays[count*n+4]=(32768>>RP04);
        costasArrays[count*n+5]=(32768>>RP05);
        costasArrays[count*n+6]=(32768>>RP06);
        costasArrays[count*n+7]=(32768>>RP07);
        costasArrays[count*n+8]=(32768>>RP08);
        costasArrays[count*n+9]=(32768>>RP09);
        costasArrays[count*n+10]=(32768>>RP10);
        costasArrays[count*n+11]=(32768>>RP11);
        costasArrays[count*n+12]=(32768>>RP12);
        costasArrays[count*n+13]=(32768>>RP13);
        costasArrays[count*n+14]=(32768>>RP14);
        costasArrays[count*n+15]=(32768>>RP15);
        count++;
        goto doReturn15;
      }
      goto begin16;
    }
returnPoint15:
    bitNum++;
  }
doReturn15:
  //  bitNum=RowPosStore[row];
  LOAD14;
  bitField=bitFieldStore[14];
  goto returnPoint14;

begin16:
  tempBitField=blankBitField;
setForbidden16:
  asm { HadBit(RP00)}
  asm { HadBit(RP01)}
  asm { HadBit(RP02)}
  asm { HadBit(RP03)}
  asm { HadBit(RP04)}
  asm { HadBit(RP05)}
  asm { HadBit(RP06)}
  asm { HadBit(RP07)}
  asm { HadBit(RP08)}
  asm { HadBit(RP09)}
  asm { HadBit(RP10)}
  asm { HadBit(RP11)}
  asm { HadBit(RP12)}
  asm { HadBit(RP13)}
  asm { HadBit(RP14)}
  asm { HadBit(RP15)}
  asm { SetBit(RP15,RP01,RP00)  }
  asm { SetBit(RP15,RP02,RP01)  }
  asm { SetBit(RP15,RP03,RP02)  }
  asm { SetBit(RP15,RP04,RP03)  }
  asm { SetBit(RP15,RP05,RP04)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP15,RP06,RP05)  }
  asm { SetBit(RP15,RP07,RP06)  }
  asm { SetBit(RP15,RP08,RP07)  }
  asm { SetBit(RP15,RP09,RP08)  }
  asm { SetBit(RP15,RP10,RP09)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP15,RP11,RP10)  }
  asm { SetBit(RP15,RP12,RP11)  }
  asm { SetBit(RP15,RP13,RP12)  }
  asm { SetBit(RP15,RP14,RP13)  }
  asm { SetBit(RP15,RP15,RP14)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP14,RP02,RP00)  }
  asm { SetBit(RP14,RP03,RP01)  }
  asm { SetBit(RP14,RP04,RP02)  }
  asm { SetBit(RP14,RP05,RP03)  }
  asm { SetBit(RP14,RP06,RP04)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP14,RP07,RP05)  }
  asm { SetBit(RP14,RP08,RP06)  }
  asm { SetBit(RP14,RP09,RP07)  }
  asm { SetBit(RP14,RP10,RP08)  }
  asm { SetBit(RP14,RP11,RP09)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP14,RP12,RP10)  }
  asm { SetBit(RP14,RP13,RP11)  }
  asm { SetBit(RP14,RP14,RP12)  }
  asm { SetBit(RP14,RP15,RP13)  }
  asm { SetBit(RP13,RP03,RP00)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP13,RP04,RP01)  }
  asm { SetBit(RP13,RP05,RP02)  }
  asm { SetBit(RP13,RP06,RP03)  }
  asm { SetBit(RP13,RP07,RP04)  }
  asm { SetBit(RP13,RP08,RP05)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP13,RP09,RP06)  }
  asm { SetBit(RP13,RP10,RP07)  }
  asm { SetBit(RP13,RP11,RP08)  }
  asm { SetBit(RP13,RP12,RP09)  }
  asm { SetBit(RP13,RP13,RP10)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP13,RP14,RP11)  }
  asm { SetBit(RP13,RP15,RP12)  }
  asm { SetBit(RP12,RP04,RP00)  }
  asm { SetBit(RP12,RP05,RP01)  }
  asm { SetBit(RP12,RP06,RP02)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP12,RP07,RP03)  }
  asm { SetBit(RP12,RP08,RP04)  }
  asm { SetBit(RP12,RP09,RP05)  }
  asm { SetBit(RP12,RP10,RP06)  }
  asm { SetBit(RP12,RP11,RP07)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP12,RP12,RP08)  }
  asm { SetBit(RP12,RP13,RP09)  }
  asm { SetBit(RP12,RP14,RP10)  }
  asm { SetBit(RP12,RP15,RP11)  }
  asm { SetBit(RP11,RP05,RP00)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP11,RP06,RP01)  }
  asm { SetBit(RP11,RP07,RP02)  }
  asm { SetBit(RP11,RP08,RP03)  }
  asm { SetBit(RP11,RP09,RP04)  }
  asm { SetBit(RP11,RP10,RP05)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP11,RP11,RP06)  }
  asm { SetBit(RP11,RP12,RP07)  }
  asm { SetBit(RP11,RP13,RP08)  }
  asm { SetBit(RP11,RP14,RP09)  }
  asm { SetBit(RP11,RP15,RP10)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP10,RP06,RP00)  }
  asm { SetBit(RP10,RP07,RP01)  }
  asm { SetBit(RP10,RP08,RP02)  }
  asm { SetBit(RP10,RP09,RP03)  }
  asm { SetBit(RP10,RP10,RP04)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP10,RP11,RP05)  }
  asm { SetBit(RP10,RP12,RP06)  }
  asm { SetBit(RP10,RP13,RP07)  }
  asm { SetBit(RP10,RP14,RP08)  }
  asm { SetBit(RP10,RP15,RP09)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP09,RP07,RP00)  }
  asm { SetBit(RP09,RP08,RP01)  }
  asm { SetBit(RP09,RP09,RP02)  }
  asm { SetBit(RP09,RP10,RP03)  }
  asm { SetBit(RP09,RP11,RP04)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP09,RP12,RP05)  }
  asm { SetBit(RP09,RP13,RP06)  }
  asm { SetBit(RP09,RP14,RP07)  }
  asm { SetBit(RP09,RP15,RP08)  }
  asm { SetBit(RP08,RP08,RP00)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP08,RP09,RP01)  }
  asm { SetBit(RP08,RP10,RP02)  }
  asm { SetBit(RP08,RP11,RP03)  }
  asm { SetBit(RP08,RP12,RP04)  }
  asm { SetBit(RP08,RP13,RP05)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP08,RP14,RP06)  }
  asm { SetBit(RP08,RP15,RP07)  }
  asm { SetBit(RP07,RP09,RP00)  }
  asm { SetBit(RP07,RP10,RP01)  }
  asm { SetBit(RP07,RP11,RP02)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP07,RP12,RP03)  }
  asm { SetBit(RP07,RP13,RP04)  }
  asm { SetBit(RP07,RP14,RP05)  }
  asm { SetBit(RP07,RP15,RP06)  }
  asm { SetBit(RP06,RP10,RP00)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP06,RP11,RP01)  }
  asm { SetBit(RP06,RP12,RP02)  }
  asm { SetBit(RP06,RP13,RP03)  }
  asm { SetBit(RP06,RP14,RP04)  }
  asm { SetBit(RP06,RP15,RP05)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP05,RP11,RP00)  }
  asm { SetBit(RP05,RP12,RP01)  }
  asm { SetBit(RP05,RP13,RP02)  }
  asm { SetBit(RP05,RP14,RP03)  }
  asm { SetBit(RP05,RP15,RP04)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP04,RP12,RP00)  }
  asm { SetBit(RP04,RP13,RP01)  }
  asm { SetBit(RP04,RP14,RP02)  }
  asm { SetBit(RP04,RP15,RP03)  }
  asm { SetBit(RP03,RP13,RP00)  }
  if(tempBitField==-1) goto endSetForbidden16;
  asm { SetBit(RP03,RP14,RP01)  }
  asm { SetBit(RP03,RP15,RP02)  }
  asm { SetBit(RP02,RP14,RP00)  }
  asm { SetBit(RP02,RP15,RP01)  }
  asm { SetBit(RP01,RP15,RP00)  }

endSetForbidden16:

  if(tempBitField==-1)
    goto returnPoint15;

  bitField=tempBitField;
  bitFieldStore[16]=bitField;

  for(bitNum=0;bitNum<n;)
  {
    if((bitField&(kOne<<bitNum))==0)
    {
      //RowPosStore[row]=bitNum;

      if(n==17)     //record layout!
      {
        if(RP01>n/2 && RP00==n/2)
          return count;
        costasArrays[count*n]=(1<<RP00);
        costasArrays[count*n+1]=(1<<RP01);
        costasArrays[count*n+2]=(1<<RP02);
        costasArrays[count*n+3]=(1<<RP03);
        costasArrays[count*n+4]=(1<<RP04);
        costasArrays[count*n+5]=(1<<RP05);
        costasArrays[count*n+6]=(1<<RP06);
        costasArrays[count*n+7]=(1<<RP07);
        costasArrays[count*n+8]=(1<<RP08);
        costasArrays[count*n+9]=(1<<RP09);
        costasArrays[count*n+10]=(1<<RP10);
        costasArrays[count*n+11]=(1<<RP11);
        costasArrays[count*n+12]=(1<<RP12);
        costasArrays[count*n+13]=(1<<RP13);
        costasArrays[count*n+14]=(1<<RP14);
        costasArrays[count*n+15]=(1<<RP15);
        costasArrays[count*n+16]=(1<<bitNum);
        count++;
        costasArrays[count*n]=(65536>>RP00);
        costasArrays[count*n+1]=(65536>>RP01);
        costasArrays[count*n+2]=(65536>>RP02);
        costasArrays[count*n+3]=(65536>>RP03);
        costasArrays[count*n+4]=(65536>>RP04);
        costasArrays[count*n+5]=(65536>>RP05);
        costasArrays[count*n+6]=(65536>>RP06);
        costasArrays[count*n+7]=(65536>>RP07);
        costasArrays[count*n+8]=(65536>>RP08);
        costasArrays[count*n+9]=(65536>>RP09);
        costasArrays[count*n+10]=(65536>>RP10);
        costasArrays[count*n+11]=(65536>>RP11);
        costasArrays[count*n+12]=(65536>>RP12);
        costasArrays[count*n+13]=(65536>>RP13);
        costasArrays[count*n+14]=(65536>>RP14);
        costasArrays[count*n+15]=(65536>>RP15);
        costasArrays[count*n+16]=(65536>>bitNum);
        count++;
        goto doReturn16;
      }
      return count;
    }
returnPoint16:
    bitNum++;
  }
doReturn16:
  //  bitNum=RowPosStore[row];
  LOAD15;
  bitField=bitFieldStore[15];
  goto returnPoint15;
}
 

Community Search:
MacTech Search:

Software Updates via MacUpdate

TextSoap 8.4 - Automate tedious text doc...
TextSoap can automatically remove unwanted characters, fix up messed up carriage returns, and do pretty much anything else that we can think of to text. Save time and effort. Be more productive. Stop... Read more
Smultron 9.4 - Easy-to-use, powerful tex...
Smultron 9 is an elegant and powerful text editor that is easy to use. Use it to create or edit any text document. Everything from a web page, a note or a script to any single piece of text or code.... Read more
QuarkXPress 13.0.0.0 - Desktop publishin...
QuarkXPress 2017 is the new version that raises the bar for design and productivity. With non-destructive graphics and image editing directly within your layout, you no longer have to choose between... Read more
Brackets 1.9.0 - Open Source Web design...
Brackets is an Open-Source editor for Web design and development built on top of Web technologies such as HTML, CSS, and JavaScript. The project was created and is maintained by Adobe, and is... Read more
Audio Hijack 3.3.4 - Record and enhance...
Audio Hijack (was Audio Hijack Pro) drastically changes the way you use audio on your computer, giving you the freedom to listen to audio when you want and how you want. Record and enhance any audio... Read more
Tunnelblick 3.7.1a - GUI for OpenVPN.
Tunnelblick is a free, open source graphic user interface for OpenVPN on OS X. It provides easy control of OpenVPN client and/or server connections. It comes as a ready-to-use application with all... Read more
Amazon Chime 4.3.5721 - Amazon-based com...
Amazon Chime is a communications service that transforms online meetings with a secure, easy-to-use application that you can trust. Amazon Chime works seamlessly across your devices so that you can... Read more
BBEdit 11.6.6 - Powerful text and HTML e...
BBEdit is the leading professional HTML and text editor for the Mac. Specifically crafted in response to the needs of Web authors and software developers, this award-winning product provides a... Read more
BBEdit 11.6.6 - Powerful text and HTML e...
BBEdit is the leading professional HTML and text editor for the Mac. Specifically crafted in response to the needs of Web authors and software developers, this award-winning product provides a... Read more
Brackets 1.9.0 - Open Source Web design...
Brackets is an Open-Source editor for Web design and development built on top of Web technologies such as HTML, CSS, and JavaScript. The project was created and is maintained by Adobe, and is... Read more

Latest Forum Discussions

See All

Clash of Clans' gets a huge new upd...
Clash of Clans just got a massive new update, and that's not hyperbole. The update easily tacks on a whole new game's worth of content to the hit base building game. In the update, that mysterious boat on the edge of the map has been repaired and... | Read more »
Thimbleweed Park officially headed to iO...
Welp, it's official. Thimbleweed Park will be getting a mobile version. After lots of wondering and speculation, the developers confirmed it today. Thimbleweed Park will be available on both iOS and Android sometime in the near future. There's no... | Read more »
Pokémon GO might be getting legendaries...
The long-awaited legendary Pokémon may soon be coming to Pokémon GO at long last. Data miners have already discovered that the legendary birds, Articuno, Moltres, and Zapdos are already in the game, it’s just a matter of time. [Read more] | Read more »
The best deals on the App Store this wee...
If you’ve got the Monday blues we have just the thing to cheer you up. The week is shaping up to be a spectacular one for sales. We’ve got a bunch of well-loved indie games at discounted prices this week along with a few that are a little more... | Read more »
Honor 8 Pro, a great choice for gamers
Honor is making strides to bring its brand to the forefront of mobile gaming with its latest phone, the Honor 8 Pro. The Pro sets itself apart from its predecessor, the Honor 8, with a host of premium updates that boost the device’s graphical and... | Read more »
The 4 best outdoor adventure apps
Now that we're well into the pleasant, warmer months, it's time to start making the most of the great outdoors. Spring and summer are ideal times for a bit of trekking or exploration. You don't have to go it alone, though. There are plenty of... | Read more »
Things 3 (Productivity)
Things 3 3.0.1 Device: iOS iPhone Category: Productivity Price: $7.99, Version: 3.0.1 (iTunes) Description: Meet the all-new Things! A complete rethinking of the original, award-winning task manager – with a perfect balance between... | Read more »
Oddball mash-up Arkanoid vs Space Invade...
In a move no one was really expecting, Square Enix has put forth an Arkanoid/Space Invaders mash-up aptly titled Arkanoid vs Space Invaders. The game launched today on both iOS and Android and the reviews are actually quite good. [Read more] | Read more »
Arkanoid vs Space Invaders (Games)
Arkanoid vs Space Invaders 1.0 Device: iOS Universal Category: Games Price: $3.99, Version: 1.0 (iTunes) Description: LAUNCH SALE: GET THE GAME AT 20% OFF! Two of the most iconic classic games ever made meet in Arkanoid vs Space... | Read more »
The best new games we played this week
Things got off to a bit of a slow start this week, but as we steadily creep towards Friday a bunch of great games have started cropping up. If you're looking for a quality new release to play this weekend, we've got you covered. Here's a handy... | Read more »

Price Scanner via MacPrices.net

9.7-inch 2017 iPad available for $298, save $...
Sams Club has 32GB 9.7″ Apple iPads available for $298 for Sams Club members. That’s $21 off MSRP. Order online and choose free local store pickup (if available) or free shipping. Read more
touchbyte Releases PhotoSync 3.2 for iOS With...
Hamburg, Germany based touchbyte has announced the release of PhotoSync 3.2 for iOS, a major upgrade to the versatile and powerful app to transfer, backup and share photos and videos over the air.... Read more
Emerson Adds Touchscreen Display and Apple Ho...
Emerson has announced the next evolution of its nationally recognized smart thermostat. The new Sensi Touch Wi-Fi Thermostat combines proven smarthome technology with a color touchscreen display and... Read more
SurfPro VPN for Mac Protects Data While Offer...
XwaveSoft has announced announce the release and immediate availability of SurfPro VPN 1.0, their secure VPN client for macOS. SurfPro VPN allows Mac users to protect their internet traffic from... Read more
13-inch Touch Bar MacBook Pros on sale for $1...
B&H Photo has 13″ MacBook Pros in stock today for up to $150 off MSRP. Shipping is free, and B&H charges NY & NJ sales tax only: - 13″ 2.9GHz/512GB Touch Bar MacBook Pro Space Gray (... Read more
Tuesday deal: $200 off 27-inch Apple iMacs
Amazon has select 27″ iMacs on sale for $200 off MSRP, each including free shipping: - 27″ 3.3GHz iMac 5K: $2099 $200 off MSRP - 27″ 3.2GHz/1TB Fusion iMac 5K: $1799 $200 off MSRP Keep an eye on our... Read more
Five To Six Million 10.5-inch iPad Pro Tablet...
Digitimes’ Siu Han and Joseph Tsai report that upstream supply chain shipments for Apple’s new 10.5-inch iPad Pro have been increasing, with monthly shipment volume expected to hit 600,000 units by... Read more
Georgia Tech Students Win Toyota and Net Impa...
Earlier this year, a team of students at Georgia Tech realized that there was a critical gap in transportation services for people who use wheelchairs, and wondered if the solution could be in the... Read more
13-inch 2.0GHz Space Gray MacBook Pro on sale...
Amazon has the 13″ 2.0GHz Space Gray non-Touch Bar MacBook Pro (MLL42LL/A) on sale for $1299.99 including free shipping. Their price is $200 off MSRP, and it’s currently the lowest price available... Read more
Roundup of 15-inch MacBook Pro sale prices, m...
B&H Photo has the new 2016 15″ Apple Touch Bar MacBook Pros in stock today and on sale for up to $200 off MSRP. Shipping is free, and B&H charges NY & NJ sales tax only: - 15″ 2.7GHz... Read more

Jobs Board

Director *Apple* ERP Integration Lead - Ast...
…make a real difference. Come, shine with us! Astellas is announcing a Director Apple ERP Integration Lead opportunity in Northbrook, IL. Purpose & Scope: This role Read more
Director *Apple* Platform, IS Data Manageme...
…a real difference. Come, shine with us! Astellas is announcing a Director Apple Platform, IS Data Management Lead opportunity in Northbrook, IL. Purpose & Scope: Read more
Associate Director *Apple* Platform -- SAP...
…real difference. Come, shine with us! Astellas is announcing a Associate Director Apple Platform -- SAP Security, Risks and Controls Lead opportunity in Northbrook, Read more
*Apple* Media Products - Commerce Engineerin...
Apple Media Products - Commerce Engineering Manager Job Number: 57037480 Santa Clara Valley, California, United States Posted: Apr. 18, 2017 Weekly Hours: 40.00 Job Read more
*Apple* Technical Support - Atrilogy (United...
Our direct client is looking for an Apple Technical Support / Apple Help Desk Specialist for a Full Time Direct Hire role in West Los Angeles by Playa Vista, CA Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.