home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 18 / CD_ASCQ_18_111294_W.iso / dos / prg / pas / gpro105 / exemple.pas < prev    next >
Pascal/Delphi Source File  |  1994-08-30  |  1KB  |  52 lines

  1. uses GRI,crt;
  2.  
  3. const validcode:string='bYfUcdcXQ]YbQT\U]Q^';
  4. {                      'rivestshamiradleman'}
  5.  
  6. var code:string;
  7.     i:byte;
  8.  
  9. begin
  10.      writeln('Début du programme de test');
  11.      writeln('--------------------------'#$d#$a);
  12.      write('Démarrage du chrono...');
  13.      if GRI_StartChrono<>$4848 then
  14.         begin
  15.              writeln('Erreur fatale!!!');
  16.              GRI_PlanteSys;
  17.         end;
  18.      writeln('ok');
  19.      write('Test d''installation...');
  20.      if GRI_CheckInstall<>$726f then
  21.         begin
  22.              writeln('Oh! no...');
  23.              halt(0);
  24.         end;
  25.      writeln('ok');
  26.      write('Recherche d''un debugger...');
  27.      if GRI_FindDebugger(ContinueProcess)=$4148 then
  28.         begin
  29.              writeln('Debugger trouvé. Attente et reboot');
  30.              delay(1000);
  31.              GRI_FindDebugger(StopProcess);
  32.         end
  33.      else writeln('ok');
  34.      write('Vérifie le chrono...');
  35.      if GRI_StopChrono(18)<>$a246 then
  36.         begin
  37.              writeln('Vous avez du pôt si vous pouvez lire çà!!');
  38.              halt;
  39.         end;
  40.      writeln('ok');
  41.      write('Entrez le code: ');
  42.      readln(code);
  43.      for i:=1 to length(code) do
  44.          byte(code[i]):=byte(code[i])-$10;
  45.      if code<>validcode then
  46.         begin
  47.              writeln('Code Invalide mais sortie en douceur.');
  48.              halt;
  49.         end;
  50.      writeln('Code valide');
  51.      writeln('Sortie du programme par int 21h/4ch');
  52. end.