anchor.diff:    Result:=Clone(r);
   end;
   
  -//function PowMod(const a,b,n:TBint):TBInt;
  +function PowMod(const a,b,n:TBint):TBInt;
  +var
  +  m,q,r:TBInt;
  +  xb:byte;
  +  lb,ib,nb:cardinal;
  +begin
  +  DivMod(a,n,q,m);
  +  r:=IntToBInt(1);
  +  ib:=0;
  +  lb:=Length(b);
  +  while ib<lb do
  +   begin
  +    xb:=byte(b[ib+BIntBase]);
  +    inc(ib);
  +    nb:=8;
  +    while (nb<>0) and (xb<>0) do
  +     begin
  +      dec(nb);
  +      if (xb and 1)<>0 then
  +        r:=Multiply(r,m);
  +      xb:=xb shr 1;
  +      if not((xb=0) and (ib=lb)) then DivMod(Multiply(m,m),n,q,m);
  +     end;
  +   end;
  +  Result:=Clone(r);
  +end;
   
   end.
  
positive.code:      end
      else
       begin
        dec(xa,c);
        c:=0;
       end;
      byte(Result[i+BintBase]):=byte(xa-xb);
  
negative.code:         rb[ib+BIntBase]:=b[ib+BIntBase];
      //rc will hold rb*xq below
      SetLength(rc,la);
      lq:=la-lb;
      SetLength(q,lq);
      xa:=0;
      na:=la;
      while lq<>0 do
       begin
        xa:=(xa shl 8) or byte(ra[na-1+BIntBase]);
        xq:=xa div byte(rb[lb-1+BIntBase]);
        if xq=0 then
          dec(na)
        else
         begin
          c:=true;
          while c do
           begin
            ia:=na-lb;
            ib:=0;
            xc:=0;
            while ia<la do
             begin
              if ib<lb then inc(xc,byte(rb[ib+BIntBase])*xq);
              byte(rc[ia+BIntBase]):=byte(xc);
              xc:=xc shr 8;
              inc(ia);
              inc(ib);
             end;
            ia:=la;
            while (ia<>0) and (rc[ia-1+BIntBase]=ra[ia-1+BIntBase]) do dec(ia);
            c:=(ia=0) or (rc[ia-1+BIntBase]>ra[ia-1+BIntBase]);
            if c then dec(xq);
           end;
          dec(lq);
          byte(q[lq+BIntBase]):=xq;
          ia:=lq;
          xc:=0;
          while ia<la do
           begin
            xa:=byte(ra[ia+BIntBase]);
            xb:=byte(rc[ia+BIntBase]);
            if (xa<xc) or (xa<xb) then
             begin
              inc(xa,$100-xc);
              xc:=1;
             end
            else
             begin
              if xc<>0 then dec(xa);
              xc:=0;
             end;
            byte(ra[ia+BintBase]):=byte(xa-xb);
            inc(ia);
           end;
          if (la<>0) and (ra[la+BIntBase]=0) then dec(la);
          na:=la;
          xa:=0;
         end;
       end;
      while (la<>0) and (byte(ra[la-1+BIntBase])=0) do dec(la);
      SetLength(m,la);
  