home *** CD-ROM | disk | FTP | other *** search
- /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
- | Copyright (c) 1987-1991, Innovative Data Concepts, Inc.
- | All Rights Reserved.
- |
- | This Library is part of IDC's TesSeRact Development Tools product
- | line. For information about other IDC products, call 1-215-443-9705.
- *-V--------------------------------------------------------------------*
- | $Header: tcxlhdw.h 552.2 21 Apr 1991 12:53:20 $
- |
- | $Log: tcxlhdw.h $
- *-D--------------------------------------------------------------------*
- | <TCXLhdw.h> : Definitions and prototypes for TCXL hardware functions
- *-N-----------------------[ Notes and Caveats ]------------------------*
- | 1) All of this is VERY dependent on MS-DOS/PC-Compatible architecture.
- | 2) _HdwCtl is declared/initilaized in TcxlInit.C.
- *======================================================================*/
- #ifndef _TCXLhdw_
- # define _TCXLhdw_ 1 /* Only once! */
- # ifndef _TCXLdef_
- # include <TCXLdef.h> /* Standard definitions */
- # endif
- /*- Machine ID's returned by Machid() ----*/
- #define IBMPC 0xFF /* IBM PC */
- #define IBMPCXT 0xFE /* IBM PC/XT, Portable, old Compaq DeskPro*/
- #define IBMPCJR 0xFD /* IBM PCjr */
- #define IBMPCAT 0xFC /* IBM PC/AT, XT/286, PS/2 Model 50,60 */
- #define IBMPCXT2 0xFB /* IBM PC/XT */
- #define IBMPS30 0xFA /* IBM PS/2 model 30 */
- #define IBMCONV 0xF9 /* IBM PC Convertible */
- #define IBMPS80 0xF8 /* IBM PS/2 model 80 */
- #define SPERRYPC 0x30 /* Sperry PC */
- #define CPQPORT 0x2D /* Old Compaq portable */
- #define CPQPLUS 0x9A /* Old Compaq plus */
- #define HP110 0xB6 /* HP-110 portable */
-
- /*- HdwFlg() Hardware option flag bits ---*/
- #define HDW_GAM 0x01 /* Game-adapter */
- #define HDW_NDP 0x02 /* Math-coprocessor */
- #define HDW_MOU 0x04 /* PS/2 mouse */
- #define HDW_MDM 0x08 /* PS/2 modem */
- #define HDW_C40 0x10 /* 40-col color */
- #define HDW_C80 0x20 /* 80-col color */
- #define HDW_M80 0x40 /* 80-col mono */
- #define HDW_TTY 0x80 /* Terminal on serial port jpl */
-
- /*------------------[ Data objects and access macros ]------------------*/
-
- TYP struct _Hdw HdwT, *HdwP;
- struct _Hdw /*-[ Hardware-data object ]---------------*/
- { BytT hpar; /* 00|00 : HdwPar() : parallel-ports */
- BytT hser; /* 01|01 : HdwSer() : serial-ports */
- BytT hdrv; /* 02|02 : HdwDrv() : floppy-drives */
- BytT hflg; /* 03|03 : HdwFlg() : option flags */
- }; /* 04|04 ]--------------------------------*/
-
- GBL HdwT CDC _HdwCtl; /*- Global Hardware-data object ----------*/
- /* access macros after prototypes */
-
- /*------------------------[ Function prototypes ]-----------------------*/
-
- #ifdef __cplusplus /* No mangling, please */
- extern "C" {
- #endif
- ChrP CTYP BiosVer(NOARG); /* Get BIOS version (maybe) */
- FlgT CTYP ClockCal(NOARG); /* Detect XT clock/cal */
- FlgT gameport(NOARG); /* Detect gameport */
- FlgT HdwC40(NOARG); /* TRUE if 40-col color video */
- FlgT HdwC80(NOARG); /* TRUE if 80-col color video */
- IntT HdwDrv(NOARG); /* Get floppy-drive count */
- FlgT HdwFlg(NOARG); /* Get hardware option flags */
- FlgT HdwGam(NOARG); /* TRUE if game-adapter present */
- FlgT HdwM80(NOARG); /* TRUE if 80-col mono video */
- FlgT HdwTty(NOARG); /* TRUE if TTY Terminal jpl */
- FlgT HdwMdm(NOARG); /* TRUE if PS/2 modem present */
- FlgT HdwMou(NOARG); /* TRUE if PS/2 mouse present */
- FlgT HdwNdp(NOARG); /* TRUE if coprocessor present */
- IntT HdwPar(NOARG); /* Get parallel port count */
- IntT HdwSer(NOARG); /* Get serial port count */
- BytT CTYP MachId(NOARG); /* Get machine-id byte (maybe) */
- FlgT mathchip(NOARG); /* Detect NDP */
- IntT numflop(NOARG); /* Get floppy-drive count */
- IntT numpar(NOARG); /* Get parallel-port count */
- IntT numser(NOARG); /* Get serial-port count */
- VOID PAS _BioEqp(NOARG); /* Get BIOS equip flags */
- #define HdwPar() (_HdwCtl.hpar) /* Parallel ports */
- #define HdwSer() (_HdwCtl.hser) /* Serial ports */
- #define HdwDrv() (_HdwCtl.hdrv) /* Floppy-drives */
- #define HdwFlg() (_HdwCtl.hflg) /* Option flags */
- #define HdwGam() (0 != (HdwFlg() & HDW_GAM)) /* Game-adapter */
- #define HdwNdp() (0 != (HdwFlg() & HDW_NDP)) /* Math-coprocessor */
- #define HdwMou() (0 != (HdwFlg() & HDW_MOU)) /* PS/2 mouse */
- #define HdwMdm() (0 != (HdwFlg() & HDW_MDM)) /* PS/2 modem */
- #define HdwC40() (0 != (HdwFlg() & HDW_C40)) /* 40-col color */
- #define HdwC80() (0 != (HdwFlg() & HDW_C80)) /* 80-col color */
- #define HdwM80() (0 != (HdwFlg() & HDW_M80)) /* 80-col mono */
- #define gameport() HdwGam() /*- obsolescent CXL 5.2 functions --------*/
- #define mathchip() HdwNdp()
- #define numflop() HdwDrv()
- #define numpar() HdwPar()
- #define numser() HdwSer()
- #ifdef __cplusplus
- }
- #endif
- #endif /*- _TCXLhdw_ : End of TCXLhdw.h ------------------------------*/