uses SpecProc;
var b:byte;
Scrc:word;
function WsetsBit(_bitNum,_bitDat:word):boolean;
begin
if (_bitDat and ($01 shl _bitNum))=0 then WsetsBit:=false else WsetsBit:=true;
end;
var CRC,i,j:word;
const data:array[1..4]of byte=($00,$00,$01,$01);
begin
for Scrc:=0 to $FFFF do
 begin
CRC:=Scrc;
for j:=1 to sizeOf(Data) do
for i:=7 downto 0 do
 begin
{writeln(whw(i));}
if WsetsBit(i,data[j])xor WsetsBit(0,CRC)xor WsetsBit(5,CRC)xor WsetsBit(12,CRC)xor WsetsBit(15,CRC) then b:=1 else b:=0;
CRC:=(CRC shl 1)+b;
 end;
if ((hi(CRC)=$FA)and(lo(CRC)=$0C))or((lo(CRC)=$FA)and(hi(CRC)=$0C)) then writeln('Scrc:=',whw(sCrc),' CRC:=',whw(CRC));
 end;
end.