program lab_12; uses crt; var i,x1,x2,y1,y2:Integer; c:string; f:Text; begin TextBackGround(16); clrscr; x1:=10; y1:=8; x2:=40; y2:=17; repeat TextBackGround(16); window(1,1,80,25); clrscr; window(x1+1,y1-1,x2+1,y2-1); TextColor(yellow); For i:=1 to 281 do write(#176); TextColor(5); Assign(f,'c:\1.txt'); reset(f); while not Eof(f) do begin readln(f,c); writeln(c); end; window(x1,y1,x2,y2); TextBackGround(2); clrscr; c:=readkey; If c=#080 then begin if y2<25 then begin y1:=y1+1; y2:=y2+1; end; end; If c=#072 then begin if y1>2 then begin y1:=y1-1; y2:=y2-1; end; end; If c=#075 then begin if x1>1 then begin x1:=x1-1; x2:=x2-1; end; end; If c=#077 then begin if x2<79 then begin x1:=x1+1; x2:=x2+1; end; end; close(f); until c=#27 end.