p; {did I press a local key?}
outfile:file; {just for making an empty file to append to}
Dumb:Byte; {dumb!}
done:boolean; {tried from '''' to #255#255#255#255#255#255#255#255}
begin
assign(outfile,''hack.org'');
{$i-} rewrite(outfile,1); {$i+}
Close(outfile); {made a 0 byte file to append to}
{init}
Cnt1:=0;
Cnt2:=0;
Cnt3:=0;
Cnt4:=0;
Cnt5:=0;
Cnt6:=0;
Cnt7:=0;
Cnt8:=0;
done:=false;
While not done do begin
{not I inc 1 char at a time}
Inc(Cnt1);
If Cnt1>255 then Begin
Cnt1:=0;
Inc(Cnt2);
End;
If Cnt2>255 then Begin
Cnt2:=0;
Inc(Cnt3);
End;
If Cnt3>255 then Begin
Cnt3:=0;
Inc(Cnt4);
End;
If Cnt4>255 then Begin
Cnt4:=0;
Inc(Cnt5);
End;
If Cnt5>255 then Begin
Cnt5:=0;
Inc(Cnt6);
End;
If Cnt6>255 then Begin
Cnt6:=0;
Inc(Cnt7);
End;
If Cnt7>255 then Begin
Cnt7:=0;
Inc(Cnt8);
End;
If Cnt8>255 then Halt;
Key:='''';
If Cnt1<>0 then key:=key+chr(cnt1);
If Cnt2<>0 then key:=key+chr(cnt2);
If Cnt3<>0 then key:=key+chr(cnt3);
If Cnt4<>0 then key:=key+chr(cnt4);
If Cnt5<>0 then key:=key+chr(cnt5);
If Cnt6<>0 then key:=key+chr(cnt6);
If Cnt7<>0 then key:=key+chr(cnt7);
If Cnt8<>0 then key:=key+chr(cnt8);
{call your decode method}
Decode(''HACK.DAT'');
{ShowFile(''HACK.ORG'');}
{so I can see its running:}
Writeln(''KEY: '',Key);
If Keypresse