program moveguy;
uses crt;

{--------------------------------------------------------------------------


                        by 

--------------------------------------------------------------------------}


VAR  x,x1,x2,y1,y2:integer;
input :char;

begin

clrscr;

x1 := 40;
y1 := 3;

x2 := 3;
y2 := 3;

repeat
textcolor (9);
gotoxy (1,1);
write ('É');

for x := 0 to 77 do write ('Í');
write ('»');
for x := 2 to 23 do begin
gotoxy (80,x);
write ('º');
end;

gotoxy (1,24);
write ('È');
for x := 0 to 77 do write ('Í');
write ('¼');

for x := 2 to 23 do begin
gotoxy (1,x);
write ('º');
end;

gotoxy (1,19);
write ('Ì');
for x := 0 to 77 do write ('Í');
write ('¹');

gotoxy (4,21);
textcolor(green);
write ('MOVE ME AROUND USING THE ARROW KEYS!!!!');
gotoxy (80,25);

textcolor (red);
gotoxy (x2,y2);
write (' ');
gotoxy (x1,y1);
write ('');
x2 := x1;
y2 := y1;

gotoxy (80,25);
input := readkey;

case input of
#72 : y1 := y1 - 1;
#80 : y1 := y1 + 1;
#75 : x1 := x1 - 1;
#77 : x1 := x1 + 1;
end;

if x1 > 79 then x1 := 79 else
if x1 < 2 then x1 := 2 else
if y1 < 2 then y1 := 2 else
if y1 > 18 then y1 := 18;

until input = 'q';

end.