home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / txcl552 / inc / tcxlhdw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-22  |  6.3 KB  |  105 lines

  1. /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
  2.  | Copyright (c) 1987-1991, Innovative Data Concepts, Inc.
  3.  | All Rights Reserved.
  4.  |
  5.  | This Library is part of IDC's TesSeRact Development Tools product
  6.  | line. For information about other IDC products, call 1-215-443-9705.
  7.  *-V--------------------------------------------------------------------*
  8.  | $Header:   tcxlhdw.h     552.2   21 Apr 1991 12:53:20  $
  9.  |
  10.  | $Log:   tcxlhdw.h    $
  11.  *-D--------------------------------------------------------------------*
  12.  | <TCXLhdw.h> : Definitions and prototypes for TCXL hardware functions
  13.  *-N-----------------------[ Notes and Caveats ]------------------------*
  14.  | 1) All of this is VERY dependent on MS-DOS/PC-Compatible architecture.
  15.  | 2) _HdwCtl is declared/initilaized in TcxlInit.C.
  16.  *======================================================================*/
  17. #ifndef  _TCXLhdw_
  18. #  define   _TCXLhdw_ 1       /* Only once!                             */
  19. #  ifndef   _TCXLdef_
  20. #     include  <TCXLdef.h>    /* Standard definitions                   */
  21. #  endif
  22.                               /*- Machine ID's returned by Machid() ----*/
  23. #define  IBMPC       0xFF     /* IBM PC                                 */
  24. #define  IBMPCXT     0xFE     /* IBM PC/XT, Portable, old Compaq DeskPro*/
  25. #define  IBMPCJR     0xFD     /* IBM PCjr                               */
  26. #define  IBMPCAT     0xFC     /* IBM PC/AT, XT/286, PS/2 Model 50,60    */
  27. #define  IBMPCXT2    0xFB     /* IBM PC/XT                              */
  28. #define  IBMPS30     0xFA     /* IBM PS/2 model 30                      */
  29. #define  IBMCONV     0xF9     /* IBM PC Convertible                     */
  30. #define  IBMPS80     0xF8     /* IBM PS/2 model 80                      */
  31. #define  SPERRYPC    0x30     /* Sperry PC                              */
  32. #define  CPQPORT     0x2D     /* Old Compaq portable                    */
  33. #define  CPQPLUS     0x9A     /* Old Compaq plus                        */
  34. #define  HP110       0xB6     /* HP-110 portable                        */
  35.  
  36.                               /*- HdwFlg() Hardware option flag bits ---*/
  37. #define  HDW_GAM     0x01     /* Game-adapter                           */
  38. #define  HDW_NDP     0x02     /* Math-coprocessor                       */
  39. #define  HDW_MOU     0x04     /* PS/2 mouse                             */
  40. #define  HDW_MDM     0x08     /* PS/2 modem                             */
  41. #define  HDW_C40     0x10     /* 40-col color                           */
  42. #define  HDW_C80     0x20     /* 80-col color                           */
  43. #define  HDW_M80     0x40     /* 80-col mono                            */
  44. #define  HDW_TTY     0x80     /* Terminal on serial port           jpl  */
  45.  
  46. /*------------------[ Data objects and access macros ]------------------*/
  47.  
  48. TYP   struct   _Hdw  HdwT, *HdwP;
  49. struct   _Hdw                 /*-[ Hardware-data object ]---------------*/
  50. {  BytT     hpar;             /* 00|00 : HdwPar() : parallel-ports      */
  51.    BytT     hser;             /* 01|01 : HdwSer() : serial-ports        */
  52.    BytT     hdrv;             /* 02|02 : HdwDrv() : floppy-drives       */
  53.    BytT     hflg;             /* 03|03 : HdwFlg() : option flags        */
  54. };                            /* 04|04 ]--------------------------------*/
  55.  
  56. GBL   HdwT  CDC   _HdwCtl;    /*- Global Hardware-data object ----------*/
  57.                               /* access macros after prototypes         */
  58.  
  59. /*------------------------[ Function prototypes ]-----------------------*/
  60.  
  61. #ifdef __cplusplus                     /* No mangling, please           */
  62.    extern   "C"   {
  63. #endif
  64. ChrP  CTYP  BiosVer(NOARG);            /* Get BIOS version (maybe)      */
  65. FlgT  CTYP  ClockCal(NOARG);           /* Detect XT clock/cal           */
  66. FlgT        gameport(NOARG);           /* Detect gameport               */
  67. FlgT        HdwC40(NOARG);             /* TRUE if 40-col color video    */
  68. FlgT        HdwC80(NOARG);             /* TRUE if 80-col color video    */
  69. IntT        HdwDrv(NOARG);             /* Get floppy-drive count        */
  70. FlgT        HdwFlg(NOARG);             /* Get hardware option flags     */
  71. FlgT        HdwGam(NOARG);             /* TRUE if game-adapter present  */
  72. FlgT        HdwM80(NOARG);             /* TRUE if 80-col mono video     */
  73. FlgT        HdwTty(NOARG);             /* TRUE if TTY Terminal      jpl */
  74. FlgT        HdwMdm(NOARG);             /* TRUE if PS/2 modem present    */
  75. FlgT        HdwMou(NOARG);             /* TRUE if PS/2 mouse present    */
  76. FlgT        HdwNdp(NOARG);             /* TRUE if coprocessor present   */
  77. IntT        HdwPar(NOARG);             /* Get parallel port count       */
  78. IntT        HdwSer(NOARG);             /* Get serial port count         */
  79. BytT  CTYP  MachId(NOARG);             /* Get machine-id byte (maybe)   */
  80. FlgT        mathchip(NOARG);           /* Detect NDP                    */
  81. IntT        numflop(NOARG);            /* Get floppy-drive count        */
  82. IntT        numpar(NOARG);             /* Get parallel-port count       */
  83. IntT        numser(NOARG);             /* Get serial-port count         */
  84. VOID  PAS   _BioEqp(NOARG);            /* Get BIOS equip flags          */
  85. #define  HdwPar() (_HdwCtl.hpar)                /* Parallel ports       */
  86. #define  HdwSer() (_HdwCtl.hser)                /* Serial ports         */
  87. #define  HdwDrv() (_HdwCtl.hdrv)                /* Floppy-drives        */
  88. #define  HdwFlg() (_HdwCtl.hflg)                /* Option flags         */
  89. #define  HdwGam() (0 != (HdwFlg() & HDW_GAM))   /*    Game-adapter      */
  90. #define  HdwNdp() (0 != (HdwFlg() & HDW_NDP))   /*    Math-coprocessor  */
  91. #define  HdwMou() (0 != (HdwFlg() & HDW_MOU))   /*    PS/2 mouse        */
  92. #define  HdwMdm() (0 != (HdwFlg() & HDW_MDM))   /*    PS/2 modem        */
  93. #define  HdwC40() (0 != (HdwFlg() & HDW_C40))   /*    40-col color      */
  94. #define  HdwC80() (0 != (HdwFlg() & HDW_C80))   /*    80-col color      */
  95. #define  HdwM80() (0 != (HdwFlg() & HDW_M80))   /*    80-col mono       */
  96. #define  gameport()  HdwGam() /*- obsolescent CXL 5.2 functions --------*/
  97. #define  mathchip()  HdwNdp()
  98. #define  numflop()   HdwDrv()
  99. #define  numpar()    HdwPar()
  100. #define  numser()    HdwSer()
  101. #ifdef __cplusplus
  102.    }
  103. #endif
  104. #endif   /*- _TCXLhdw_ : End of TCXLhdw.h ------------------------------*/
  105.