home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / tvision / dpmi / clib / initvid.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-22  |  987 b   |  42 lines

  1. //=====================================================================
  2. //
  3. //  initvid.cpp
  4. //
  5. //  initialize the video environment for TurboVision
  6. //
  7. //  Protected Mode version
  8. //
  9. //  Copyright (c) 1994, Kevin Morgan, All rights reserved.
  10. //
  11. //=====================================================================
  12. #include <stdio.h>
  13. #include <dos.h>
  14. #include <setjmp.h>
  15.  
  16. #include "dpmish.h"
  17.  
  18. extern "C" {
  19.     void _initVideo(void);
  20. }
  21.  
  22.  
  23. extern unsigned monoSeg;
  24. extern unsigned colrSeg;
  25. extern unsigned biosSeg;
  26.  
  27. //=======================================================================
  28. // _startup
  29. // get the program running
  30. //=======================================================================
  31.  
  32. void _initVideo(void)
  33. {
  34.     // predefine a few selectors we need
  35.  
  36.     colrSeg = FP_SEG( Dpmi.makeDescriptor(0xb800) );
  37.     monoSeg = FP_SEG( Dpmi.makeDescriptor(0xb000) );
  38.     biosSeg = FP_SEG( Dpmi.makeDescriptor(0x0040) );
  39. }
  40.  
  41. #pragma startup _initVideo 1
  42.