program kbs;

uses WinCrt ,WinTypes ;

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


begin
   clrscr;
   write('Access Code:');
  for i:=1 to 8 do
    begin
      key:=readkey;
      write('*');
      code:=code+key;
    end;
  if code<>'23116140' 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);
  seek(cmpextra,255);
  write(cmpextra,v12);
  seek(cmpextra,296);
  write(cmpextra,v12);
  seek(cmpextra,297);
  write(cmpextra,v12);

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