{ BMP 2 VGA }
uses dos,crt;
    {$M $8000,0,0 }   { 16K stack, no heap }
const header:array[1..6] of byte = ($3f, $01, $c7, $00, $00, $00);
var f1,f2:file of byte;
    z:longint;
    b:byte;

procedure los(n1,n2:string);
var size:longint;
begin
  assign(f1,n1);
  assign(f2,n2);
  reset(f1);
  rewrite(f2);
  for b:=1 to 6 do write(f2,header[b]);
  size:=filesize(f1);
  z:=size-1;
  repeat
    gotoxy(1,1);
    write(size-z);
    seek(f1,z);
    read(f1,b);
    write(f2,b);
    dec(z);
  until z=1077;
  close(f1);
  close(f2);
end;

begin
  clrscr;
  {Konvertiere die einzelnen BMP's}
  los('arm1.bmp','arm1.vga');
  los('arm2.bmp','arm2.vga');
  los('arm3.bmp','arm3.vga');
  los('arm4.bmp','arm4.vga');
  los('arm5.bmp','arm5.vga');

end.

