(*----------------------------------------------------------------------*)
(*                Display_Help --- Display Command List                 *)
(*----------------------------------------------------------------------*)

OVERLAY PROCEDURE Display_Help( FirstTime : BOOLEAN );

(*----------------------------------------------------------------------*)
(*                                                                      *)
(*     Procedure:  Display_Help                                         *)
(*                                                                      *)
(*     Purpose:    Displays Command List                                *)
(*                                                                      *)
(*     Calling Sequence:                                                *)
(*                                                                      *)
(*        Display_Help( FirstTime : BOOLEAN );                          *)
(*                                                                      *)
(*           FirstTime --- TRUE for first call, else FALSE              *)
(*                                                                      *)
(*      Calls:   ClrScr                                                 *)
(*               KeyPressed                                             *)
(*               Async_Send                                             *)
(*               Restore_Screen                                         *)
(*               Save_Screen                                            *)
(*               Draw_Menu_Frame                                        *)
(*                                                                      *)
(*----------------------------------------------------------------------*)

VAR
   Ch: CHAR;

BEGIN (* Display_Help *)

                                   (* Tell host to stop sending *)

   Async_Send( CHR( XOFF ) );

                                   (* Save current screen image *)

   Save_Screen( Saved_Screen );

                                   (* Display help information  *)

   Draw_Menu_Frame( 2, 1, 78, 24, Menu_Frame_Color, Menu_Text_Color,
               ' Available Commands ' );

   WRITELN('  Alt-A:  Edit line on screen');
   WRITELN('  Alt-B:  Send Break                 Shift-Tab:  Toggle adding linefeeds');
   WRITELN('  Alt-C:  Clear Screen               Alt-D:  Dial a number');

   WRITE  ('  Alt-E:  Toggle local echo');
   IF Local_Echo THEN
      WRITELN('(Currently ON)')
   ELSE
      WRITELN('(Currently OFF)');

   WRITELN('  Alt-F:  File manipulation          Alt-G:  Enter gossip mode');
   WRITELN('  Alt-H:  Hang up the phone          Alt-I:  Produce this command list');
   WRITELN('  Alt-J:  Jump to DOS                Alt-K:  Set function keys');
   WRITELN('  Alt-L:  Log session to printer');
   WRITE  ('  Alt-M:  Toggle Silent Mode ');
   IF Silent_Mode THEN
      WRITE('(Currently ON)')
   ELSE
      WRITE('(Currently OFF)');
   WRITELN;
   WRITELN('  Alt-N:  New comm. parameters       Alt-O:  Output session to disk');
   WRITELN('  Alt-P:  Set parameters             Alt-Q:  Redial last number dialed');
   WRITELN('  Alt-R:  Receive file from remote   Alt-S:  Send file to remote');
   WRITELN('  Alt-T:  Get translate table        Alt-U:  Screen dump to file');
   WRITELN('  Alt-V   Review captured text       Alt-W:  Wait for call');
   WRITELN('  Alt-X:  Exit PibTerm               Alt-Y:  Set/Reset Timers');
   WRITELN('  Alt-Z:  Get area code');
   WRITELN;

   IF FirstTime THEN
      WRITE('Hit any key to start terminal emulation.')
   ELSE
      WRITE('Hit any key to return to terminal emulation.');

                                   (* Wait for key to be hit        *)
                                   (* Get rid of the character read *)

   READ( Kbd, Ch );                (* Read 2 chars if 1st was ESC   *)

   IF ( Ch = CHR( ESC ) ) AND KeyPressed THEN READ( Kbd, Ch );

                                   (* Restore previous screen image *)
   Restore_Screen( Saved_Screen );

                                   (* Tell host to continue sending *)
   Async_Send( CHR( XON ) );

                                   (* Reset global colors           *)
   Reset_Global_Colors;

END   (* Display_Help *);
