program line;

{need line.pcx}

uses crush13h,crt;

const x=64;

var bar:pointer;
    crush:pointer;
    a:integer;
    y:integer;

begin
     video_mode ( $13);
     initvirt;

     cls (0,vga);
     cls (0,vp[1]);
     cls (0,vp[2]);

     loadpcx ('line.pcx',vp[1]);

     getimage (59,0,200,60,crush,vp[1]);
     getimage (61,64,200,72,bar,vp[1]);

     repeat
     for y:=5 to 25 do
         begin
              cls (0,vp[2]);
              putimage (x,y*2,0,bar,vp[2]);
              putimage (63,9,255,crush,vp[2]);
              copypage (vp[2],vga,10);
              waitvbl;
         end;
     for y:=25 downto 5 do
         begin
              cls (0,vp[2]);
              putimage (x,y*2,0,bar,vp[2]);
              putimage (63,9,255,crush,vp[2]);
              copypage (vp[2],vga,10);
              waitvbl;
         end;

     until keypressed;
     readkey;


     closevirt;
     video_mode ( 03);

end.