home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / PIBTERM / PIBT41S4.ARC / SETOPAR.MOD < prev    next >
Encoding:
Text File  |  1988-03-22  |  3.5 KB  |  102 lines

  1. (*----------------------------------------------------------------------*)
  2. (*     Set_Other_Parameters --- Set other parameters at init. time      *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. PROCEDURE Set_Other_Parameters;
  6.  
  7. VAR
  8.    Regs : Registers;
  9.    N    : INTEGER;
  10.  
  11. BEGIN (* Set_Other_Parameters *)
  12.                                    (* Initialize text mode *)
  13.  
  14.    IF Text_Mode <> New_Text_Mode THEN
  15.       BEGIN
  16.          Text_Mode := New_Text_Mode;
  17.          Set_Text_Mode( Text_Mode );
  18.       END;
  19.                                    (* Update wait-for-retrace option *)
  20.  
  21.    Wait_For_Retrace := Wait_For_Retrace_Par AND
  22.                        ( NOT ( EGA_Present OR ( Current_Video_Mode = 7 ) ) );
  23.  
  24.                                    (* Set write to screen mode *)
  25.  
  26.    Write_Screen_Memory := Write_Screen_Memory_Par (* OR TimeSharingActive *);
  27.  
  28.                                    (* Get screen sizes *)
  29.  
  30.    Max_Screen_Col  := New_Max_Screen_Col;
  31.    Max_Screen_Line := New_Max_Screen_Line;
  32.  
  33.                                    (* Fix up EGA/VGA display *)
  34.    IF EGA_Installed THEN
  35.       BEGIN
  36.                                    (* Set screen width for ATI *)
  37.          IF ATI_Ega_Wonder THEN
  38.             BEGIN
  39.                CASE Max_Screen_Col OF
  40.                   132: BEGIN
  41.                           Regs.AX := $23;
  42.                           INTR( $10, Regs );
  43.                        END;
  44.                   ELSE BEGIN
  45.                           Regs.AX := $03;
  46.                           INTR( $10, Regs );
  47.                        END;
  48.                END (* CASE *);
  49.             END (* BEGIN *);
  50.                                    (* Set screen length *)
  51.          N := Get_Rows_For_EGA;
  52.  
  53.          IF ( Max_Screen_Line <> N ) THEN
  54.             Set_EGA_Text_Mode( Max_Screen_Line );
  55.  
  56.       END;
  57.                                    (* Set window size *)
  58.  
  59.    PibTerm_Window( 1, 1, Max_Screen_Col, Max_Screen_Line );
  60.  
  61.                                    (* Set colors *)
  62.  
  63.    ForeGround_Color  := New_ForeGround_Color;
  64.    BackGround_Color  := New_BackGround_Color;
  65.    Menu_Text_Color   := New_Menu_Text_Color;
  66.    Menu_Text_Color_2 := New_Menu_Text_Color_2;
  67.    Menu_Title_Color  := New_Menu_Title_Color;
  68.    Menu_Frame_Color  := New_Menu_Frame_Color;
  69.    Border_Color      := New_Border_Color;
  70.  
  71.    Set_Global_Colors( ForeGround_Color , BackGround_Color );
  72.    Set_Border_Color ( Border_Color );
  73.  
  74.                                    (* Set screen attributes *)
  75.  
  76.    Set_Text_Attributes( 1, 1, Max_Screen_Col, Max_Screen_Line,
  77.                         ForeGround_Color, BackGround_Color );
  78.  
  79.                                    (* Update software_scrolling option *)
  80.  
  81.    Software_Scroll := Software_Scroll_Par AND Wait_For_Retrace AND
  82.                       Write_Screen_Memory AND ( NOT TimeSharingActive );
  83.  
  84.                                    (* Fixup keyboard handler if needed *)
  85.    IF Extended_Keypad THEN
  86.       Install_Keyboard_Handler;
  87.                                    (* Fixup video handler if needed    *)
  88.    IF Software_Scroll THEN
  89.       Install_Video_Handler;
  90.                                    (* Open the logging file *)
  91.  
  92.    Add_Path( Log_File_Name, Home_Dir, Log_File_Name );
  93.  
  94.    IF Logging_On THEN
  95.       IF ( NOT Log_File_Open ) THEN
  96.          Log_File_Open := Open_For_Append( Log_File,
  97.                                            Log_File_Name, N );
  98.  
  99.                                    (* Set new line mode *)
  100.    New_Line := New_Line_Param;
  101.  
  102. END   (* Set_Other_Parameters *);