{ partition creator for ATARI HarDisk simulator }

type sector=array[0..255] of byte;

var part:file of sector;
    sect:sector;
    i,a :word;
    n   :string[9];
    m   :string;
    c   :integer;

begin
  if paramcount<>2 then
    begin
      writeln;
      writeln('Execute with parameters: number of partition, quantity of sectors');
      exit;
    end;
  n:='atari.000';
  m:=paramstr(1);
  n[9]:=m[1];
  assign(part,n);
  rewrite(part);
  val(paramstr(2),a,c);
  if c<>0 then exit;
  for i:=0 to 255 do
    sect[i]:=0;
  for i:=0 to a-1 do
    write(part,sect);
  close(part);
end.
