Exp=z
@c1=KeyReturn:= Cal_2('@f', @p, 16, a, b, c, d, PAnsiChar(KeyPath), 2000);
@c2=KeyReturn:= Cal_2('@f', @p, 16, a, b, c, d, PAnsiChar(KeyPath), 2000);
@va=a
@vb=b
@vc=c
@vd=d
@end
                                        
//CheckKey_1ãǷڶӦļ
//ؽ棬ʾڶӦļ򷵻ؼ
//KeyLastError=0ȷΪμֲ
function CheckKey_1: boolean;
var
  a, b, c, d, F1, F2, F3, F4: byte;
  KeyReturn: integer;
begin
  KeyLastError:= 0;
//ǿüһЩм㣬ڼҲЩͬ㣬ͬ
//ʾڶӦļʾδҵӦļδעע
  Randomize;       //ʼ
  F1:= Random(256); //ȸ
  F2:= Random(256); //ȸ
  F3:= Random(256); //ȸ
  F4:= Random(256); //ȸ
  a:= F1;
  b:= F2;
  c:= F3;
  d:= F4;

//ⲽa,b,c,d͵ڲм,
//@fļе@pλдмʽ
//üʽԶ
  KeyReturn:= Cal_2('@f', @p, 16, F1, F2, F3, F4, PAnsiChar(KeyPath), 2000);
  if KeyReturn<> 0 then
    begin
    Result:= False;
    KeyLastError:= KeyReturn; //ô
    Exit;
    end;

//ｫa,b,c,dڼжԸղŲͬļ㣻
{$R-} //ҪλʱȡԽ
  @1
//{$R+} //ָָʾԽ⣬ɲøü⡣

//бȽϣٷظ
  Result:= (F1= a) and (F2= b) and (F3= c) and (F4= d);
end;
////////////////////////////////////////////////////////////////////////////////