Program bounce;
var x,y,dx,dy,i: Integer;
begin
Poke(752,1);
ClrScr;
x:=5; y:=3; dx:=1; dy:=1;
repeat
x:=x+dx;
y:=y+dy;
GotoXY(x,y); Write('•');
for i:=1 to 100 do;
if (x=39) and (y=23) then ClrScr;
GotoXY(x,y); Write(' ');
if (x>38) or (x<1) then dx:=-dx;
if (y>22) or (y<1) then dy:=-dy;
until keypressed;
Poke(752,0);
end.