program kbs;

uses Crt ;

var
    cfile:string;
    cmpextra:file of byte;
    v12:byte;
    drive:string;
    directory:string;
    cno:string;
    code:string[13];
    key:char;
    i:integer;


begin
  clrscr;
  write('Access Code:');




  for i:=1 to 13 do
  begin
     key:=readkey;
     write('*');
     code:=code+key;
  end;
  if code<>'zanm34b231161' then
                   begin
                      writeln;
                      writeln('no access rights...good day!');
                      exit;
                   end;
  writeln;
  write('Drive:');
  readln(drive);
  write('Directory:');
  readln(directory);
  write('Comp No:');
  readln(cno);
  cfile:=drive+':\'+directory+'\file\'+cno+'\cmpextra.dat';
  assign(cmpextra,cfile);
  reset(cmpextra);

  v12:=0;
  seek(cmpextra,250);
  write(cmpextra,v12);
  seek(cmpextra,251);
  write(cmpextra,v12);
  seek(cmpextra,252);
  write(cmpextra,v12);
  seek(cmpextra,253);
  write(cmpextra,v12);
  v12:=86;
  seek(cmpextra,255);
  write(cmpextra,v12);
  v12:=147;
  seek(cmpextra,296);
  write(cmpextra,v12);

  close(cmpextra);
  writeln;
  writeln('OK!');
end.
