procedure transmit_color;
begin
  textcolor(f_clr[0]);
  textbackground(b_clr[0]);
end;

procedure receive_color;
begin
  textcolor(f_clr[1]);
  textbackground(b_clr[1]);
end;

procedure status_color;
begin
  textcolor(f_clr[2]);
  textbackground(b_clr[2]);
end;

procedure prompt_color;
begin
  textcolor(f_clr[3]);
  textbackground(b_clr[3]);
end;

procedure aux_color;
begin
  textcolor(f_clr[4]);
  textbackground(b_clr[4]);
end;

procedure help_color;
begin
  textcolor(f_clr[5]);
  textbackground(b_clr[5]);
end;

procedure check_video;
var regs : registers;
begin
  regs.AX := $0F00;
  Intr($10, regs);
  case regs.AL of
    2,3 : vid_type := 1;
      7 : vid_type := 0;
  end;
end;

procedure save_screen;
begin
  case vid_type of
    0 : image := mono_screen;
    1 : image := color_screen;
  end;
end;

procedure restore_screen;
begin
  window(1,1,80,24);
  case vid_type of
    0 : mono_screen := image;
    1 : color_screen := image;
  end;
  receive_color;
  gotoxy(xin,yin);
end;

procedure save_entry_screen;
begin
  curs_x := whereX;
  curs_y := whereY;
  case vid_type of
    0 : screen1 := mono_screen;
    1 : screen1 := color_screen;
  end;
end;

procedure restore_entry_screen;
begin
  case vid_type of
    0 : mono_screen := screen1;
    1 : color_screen := screen1;
  end;
  window(1,1,80,25);
  gotoxy(curs_x,curs_y);
end;

