Program Set_To_Box;

Type
        BIOS_Call = Record
                      AX, BX, CX, DX, BP, SI, DS, ES, Flags : Integer;
                    End;

        XFer_Area = Record
                      Case Boolean of
                        True : (Lo, Hi : Byte);
                        False : (I : Integer);

                    End;

Var  BIOS_Rec : BIOS_Call;
     XFer_Rec : XFer_Area;
     Upper, Lower : Byte;
     Ch : Char;
     I : Integer;
     Done : Boolean;

Procedure Doittoit;
Begin
  Xfer_Rec.Lo := 0;
  XFer_Rec.Hi := 1;
  BIOS_Rec.AX := XFer_Rec.I;
  XFer_Rec.Lo := Upper;
  XFer_Rec.Hi := Lower;
  BIOS_Rec.CX := XFer_Rec.I;
  Intr(16,BIOS_Rec);
End;

Procedure Menu;
Begin
  ClrSCR;
  Writeln('1 = Top half Box');
  Writeln(' ');
  Writeln('2 = Bottom half Box');
  Writeln(' ');
  Writeln('3 = Full Box');
  Writeln(' ');
  Writeln('4 = Normal');
  Writeln(' ');
End;

Begin
  Done := False;
  Repeat
  Menu;
  Read(Kbd,Ch);
  I := Ord(Ch) - 48;


  Case I of
    1 : Begin
          Upper := 7;
          Lower := 0;
          Doittoit;
          Halt;
        End;
    2 : Begin Upper := 13; Lower := 7; Doittoit; Halt; End;
    3 : Begin Upper := 13; Lower := 0; Doittoit; Halt; End;
    4 : Begin Upper := 13; Lower := 12; Doittoit;Halt; End;
  End;
      Until Done;
End.
ne conforms to PASCAL's idea of a string (