PROGRAM Test;

USES Crt;

PROCEDURE Rahmen(x1,y1,x2,y2,Hg,Fg : BYTE);
VAR a,b : BYTE;
BEGIN
 TextBackGround(Hg);TextColor(Fg);
 GotoXY(x1,y1); Write(#201);
 GotoXY(x2,y2); Write(#188);
 GotoXY(x1,y2); Write(#200);
 GotoXY(x2,y1); Write(#187);
 GotoXY(x1+1,y1);
 FOR a := x1+1 TO x2-1 DO Write(#205);
 GotoXY(x1+1,y2);
 FOR a := x1+1 TO x2-1 DO Write(#205);
 FOR a := y1+1 TO y2-1 DO BEGIN
  GotoXY(x1,a);
  Write(#186);
 END;
 FOR a := y1+1 TO y2-1 DO BEGIN
  GotoXY(x2,a);
  Write(#186);
 END;
 FOR b := y1+1 TO y2-1 DO BEGIN
  GotoXY(x1+1,b);
  FOR a := x1+1 TO x2-1 DO BEGIN
   Write(' ');
  END;
 END;
 GotoXY(x1+1,y2+1);
 FOR a := x1+1 TO x2+1 DO BEGIN
  TextBackGround(Black);
  Write(' ');
 END;
 FOR a := y1+1 TO y2+1 DO BEGIN
  GotoXY(x2+1,a);
  Write(' ');
 END;
END;

BEGIN
 TextBackGround(1);
 ClrScr;
 Rahmen(3,3,30,20,3,6);
 ReadLn;
END.