anchor.diff:  {                                                                            }
   {             For tests, see BigIntegerDevelopmentTests.dproj. The data      }
   {             for these tests are generated by a C# program, in the          }
  -{             Tests\CSharp\BigIntegerTestGenerator subdirectory.             }
  +{             DataGenerators\BigIntegers\BigIntegerTestGenerator             }
  +{             subdirectory, or by a Java program, in the                     }
  +{             DataGenerators\BigIntegers\Java\BigIntegerTestDataGenerator    }
  +{             subdirectory.                                                  }
   {                                                                            }
   { Credits:    Thanks to Peter Cordes, Nils Pipenbrinck and Johan Bontes for  }
   {             their help on StackOverflow:                                   }
  
positive.code:     // Internal function dividing magnitude by given base value. Leaves quotient in place, returns remainder.
      class function InternalDivideByBase(Mag: PLimb; Base: Integer; var Size: Integer): UInt32; static;
      // Internal function multiplying by 16 bit integer and then adding 16 bit value. Used by parser.
      class procedure InternalMultiplyAndAdd16(const Multiplicand: TMagnitude; Multiplicator, Addend: UInt16; const Res: TMagnitude); static;
      // Internal function multiplying by 32 bit integer and then adding 32 bit value. Used by parser.
      class procedure InternalMultiplyAndAdd32(const Multiplicand: TMagnitude; Multiplicator, Addend: UInt32; const Res: TMagnitude); static;
      // Internal function negating magnitude (treating it as two's complement).
      class procedure InternalNegate(Source, Dest: PLimb; Size: Integer); static;
  
      // Burnikel-Ziegler and helper functions.
      // Divides two magnitudes using Burnikel-Ziegler algorithm.
      class procedure InternalDivModBurnikelZiegler(const Left, Right: BigInteger; var Quotient, Remainder: BigInteger); static;
      // Divides a BigInteger by 3 exactly. BigInteger is guaranteed to be a positive multiple of 3.
      class function DivideBy3Exactly(const A: BigInteger): BigInteger; static;
      // Helper function for Burnikel-Ziegler division. See explanation in implementation section.
      class procedure DivThreeHalvesByTwo(const LeftUpperMid, LeftLower, Right, RightUpper, RightLower: BigInteger; N: Integer; var Quotient, Remainder: BigInteger); static;
      // Helper function for Burnikel-Ziegler division.
      class procedure DivTwoDigitsByOne(const Left, Right: BigInteger; N: Integer; var Quotient, Remainder: BigInteger); static;
  
      // Karatsuba and Toom-Cook helper functions
      // Add Addend into current BigInteger, at given offset.
  
negative.code: 
          MOV     ECX,RSize
          MOV     EDX,LSize
          CMP     EDX,ECX                 // Swap Left/Right and LSize/RSize if RSize > LSize
          JAE     @SkipSwap
          XCHG    ECX,EDX
          XCHG    ESI,EDI
  
  @SkipSwap:
  
          // Here: Left longer than or equal length as Right.
  
          SUB     EDX,ECX
          PUSH    EDX                     // Difference in sizes --> length of rest loop.
          MOV     EDX,ECX                 // Smallest size.
          AND     EDX,CUnrollMask         // Tail counter.
          SHR     ECX,CUnrollShift        // Unrolled loop counter.
          CLC
          JE      @MainTail
  
          .ALIGN  16
  
  @MainLoop:
  
          // Unrolled main loop.
  
          MOV     EAX,[ESI]
          ADC     EAX,[EDI]
  