home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Interdit
/
pc-interdit.iso
/
motpasse
/
motpasse.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-10-18
|
2KB
|
91 lines
{$F+}
{$M $4000,550000,650000}
program controlemotdepasse;
uses crt,design;
const motsdepasse : array[1..10] of string =
('Micro Application','Inspire','PC Interdit','Soundblaster',
'Démos','Super','Vengeance','Dynamite','Bière','Maison');
mdpPages : array[1..10] of word =
(17,3,29,43,12,21,4,9,13,30);
Var mdp_nr : byte;
iterations_restantes : byte;
motdepasse_correct : word;
New_Pass : string;
Pchoisir_nouveau_motdepasse : pointer;
Pdessiner_cadre_de_saisie : pointer;
Pdemander_motdepasse : pointer;
Parreter_systeme : pointer;
variable_bidon1 : word;
variable_bidon2 : word;
{$L c:\edition\prog\fr\asm\Pwmodul}
procedure boucle_de_saisie; far; external;
procedure choisir_nouveau_motdepasse;
begin;
mdp_nr := random(10)+1;
variable_bidon1 := 1;
variable_bidon2 := 2;
end;
procedure dessiner_cadre_de_saisie;
var mdps : string;
begin;
str(mdpPages[mdp_nr]:2,mdps);
asm int 3; end;
Fenetre(20,10,50,4,'Veuillez taper le mot de passe de la page '+mdps,black,7);
variable_bidon1 := 1;
variable_bidon2 := 2;
gotoxy(23,12);
end;
procedure demander_motdepasse;
begin;
readln(New_Pass);
variable_bidon1 := 1;
variable_bidon2 := 2;
if New_Pass = motsdepasse[mdp_nr] then
motdepasse_correct := 1
else
motdepasse_correct := 0;
end;
procedure arreter_systeme;
begin;
textbackground(black);
textcolor(7);
clrscr;
writeln('Il aurait mieux valu acheter la version originale...');
halt(0);
end;
procedure Main_Programm;
begin;
textbackground(black);
textcolor(7);
clrscr;
gotoxy(20,12);
writeln('Bienvenue dans le programme principal !');
gotoxy(20,22);
write('<Entrée> pour terminer ... ');
readln;
halt(0);
end;
begin;
textbackground(black);
textcolor(7);
clrscr;
iterations_restantes := 57;
Pchoisir_nouveau_motdepasse := @choisir_nouveau_motdepasse;
Pdessiner_cadre_de_saisie := @dessiner_cadre_de_saisie;
Pdemander_motdepasse := @demander_motdepasse;
Parreter_systeme := @arreter_systeme;
randomize;
boucle_de_saisie;
end.