program scrollfiddling;

uses crush13h,crt;

var c:char;
    a,x,y:integer;
    count:integer;

procedure copypage_l(y1:integer;from:word;y2:integer;too:word);
var a:integer;
begin
     for a:=y2 to y2+200 do
         begin
              if a>-1 then if a<200 then move(mem[from:320*(a-y2)],mem[too:320*a],320);
         end;
end;

begin
     video_mode ( $13);
     initvirt;

     loadpcx ('c:\ps\neopaint\pcx\claw2.pcx',vp[1]);
     count:=200;

     repeat

     count:=count+1;
     if count>200 then count:=-200;

     waitvbl;

     copypage_l(0,vp[1],count,vga);


     if keypressed=true then
        begin
             c:=readkey;
        end;
     until c=#27;

     closevirt;
     video_mode ( 03);
end.