home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / MADTRB16.ZIP / PIBMENUS.FI2 < prev    next >
Encoding:
Text File  |  1986-02-15  |  2.7 KB  |  62 lines

  1. Date:  April 1, 1985
  2. From:  Philip R. Burns
  3. To:    PIBMENUS users
  4.  
  5.  
  6. This file contains fixes to the PIBMENUS routines so that they
  7. will work correctly with version 3.0 of Turbo Pascal.
  8.  
  9. First, add the following global variable declaration to the others
  10. in PIBMENUS:
  11.  
  12.    Menu_Turbo_Version   : Integer             (* Version of Turbo Pascal *);
  13.  
  14. This variable will take on values of 2 or 3, depending upon the
  15. version of Turbo Pascal.  You may set this variable (to 2 or 3)
  16. in the initialization code of your program, or you may call the
  17. following procedure, which will also set the variable:
  18.  
  19. ----------------------------------------------------------------------------
  20.  
  21. (*----------------------------------------------------------------------*)
  22. (*          Set_Turbo_Version --- Set version of Turbo Pascal           *)
  23. (*----------------------------------------------------------------------*)
  24.  
  25. Procedure Set_Turbo_Version;
  26.  
  27. (*----------------------------------------------------------------------*)
  28. (*                                                                      *)
  29. (*     Procedure:  Set_Turbo_Version                                    *)
  30. (*                                                                      *)
  31. (*     Purpose:   Set version of Turbo Pascal                           *)
  32. (*                                                                      *)
  33. (*     Calling Sequence:                                                *)
  34. (*                                                                      *)
  35. (*        Set_Turbo_Version;                                            *)
  36. (*                                                                      *)
  37. (*      Calls:   Window                                                 *)
  38. (*                                                                      *)
  39. (*      Remarks:                                                        *)
  40. (*                                                                      *)
  41. (*         This routine heuristically determines which version (2 or 3) *)
  42. (*         of Turbo Pascal it has been compiled with.  This information *)
  43. (*         is needed to save the coordinates of the current window when *)
  44. (*         performing a screen save.                                    *)
  45. (*                                                                      *)
  46. (*----------------------------------------------------------------------*)
  47.  
  48. BEGIN (* Set_Turbo_Version *)
  49.  
  50.                                    (* Set an unusual window *)
  51.    Window( 53, 23, 78, 25 );
  52.  
  53.    IF ( MEM[ Dseg : 4 ] = 52 ) AND
  54.       ( MEM[ Dseg : 5 ] = 22 ) THEN
  55.       Menu_Turbo_Version := 3
  56.    ELSE
  57.       Menu_Turbo_Version := 2;
  58.  
  59.    Window( 1, 1, 80, 25 );
  60.  
  61. END   (* Set_Turbo_Version *);
  62.