home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / BOXMENU.ZIP / TURBOWIN.BOX < prev   
Encoding:
Text File  |  1985-09-17  |  2.4 KB  |  52 lines

  1.  
  2. {----------------------------------------------------------------------}
  3. {                TURBO Pascal Window Location Routines                 }
  4. {----------------------------------------------------------------------}
  5. {                                                                      }
  6. {  These routines and constants give the four corners of the current   }
  7. {  Turbo window:                                                       }
  8. {                                                                      }
  9. {    Lower right-hand corner: (Lower_Right_Column, Lower_Right_Row)    }
  10. {    Upper left_hand corner:  (Upper_Left_Column, Upper_Right_Column)  }
  11. {  Warning: This implementation is specific to                         }
  12. {           MS-DOS Turbo Pascal Ver 2.00                               }
  13. {----------------------------------------------------------------------}
  14.  
  15.                                    { Lower right corner of     }
  16.                                    { current TURBO window      }
  17. Var
  18.    Lower_Right_Column  : Byte ABSOLUTE Cseg:$016A;
  19.    Lower_Right_Row     : Byte ABSOLUTE Cseg:$016B;
  20.  
  21.    Upper_Left_Column   : Byte ABSOLUTE Dseg:$0156;
  22.    Upper_Left_Row      : Byte ABSOLUTE Dseg:$0157;
  23.  
  24.  
  25.  
  26. {----------------------------------------------------------------------}
  27. {                Mnu_Window --- Create a window on the screen          }
  28. {----------------------------------------------------------------------}
  29.  
  30. procedure Mnu_Window( X1, Y1 : Byte;
  31.                       X2, Y2 : Byte );
  32. {                                                                      }
  33. {     Procedure:  Mnu_Window                                           }
  34. {                                                                      }
  35. {     Purpose:    Creates Window for menu.                             }
  36. {                                                                      }
  37. {     Cautions:   Works only with Turbo Pascal V 2.0 !!!               }
  38. {                                                                      }
  39.  
  40. begin  {  Mnu_Window  }
  41.  
  42.   if ( X1 < X2 )  and  ( Y1 <= Y2 ) then begin
  43.     Upper_Left_Column  := X1 - 1;
  44.     Upper_Left_Row     := Y1 - 1;
  45.  
  46.     Lower_Right_Column  := X2;
  47.     Lower_Right_Row     := Y2;
  48.   end
  49.  
  50. end;   {  Mnu_Window  }
  51.  
  52.