/*=====[ The TesSeRact(TM) CXL User Interface Development System ]======* | Copyright (c) 1987-1990, Innovative Data Concepts. All Rights Reserved | | This Library is part of IDC's TesSeRact Development Tools product | line. For information about other IDC products, call 1-215-884-3373. *----------------------------------------------------------------------* | : Definitions and prototypes for TCXL hardware functions *----------------------------------------------------------------------* | PGS : $Id: tcxlhdw.h 5.51 90/10/01 00:00:00 MLM Release Locker: MLM $ | $Log: tcxlhdw.h $ | Revision 5.51 90/10/01 00:00:00 MLM | TCXL 5.51 | *======================================================================*/ #ifndef _TCXLhdw_ # define _TCXLhdw_ 1 /* only once! */ # ifndef _TCXLdef_ # include # 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 */ /*- 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 */ /*------------------[ Data objects and access macros ]------------------*/ TYP struct Hdw HdwT, *HdwP; struct Hdw /*-[ Hardware-data object ]---*/ { BytT hpar; /* 00|00 : parallel-ports */ BytT hser; /* 01|01 : serial-ports */ BytT hdrv; /* 02|02 : floppy-drives */ BytT hflg; /* 03|03 : 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) */ IntT CTYP ClockCal(NOARG); /* Detect XT clock/cal */ IntT gameport(NOARG); /* Detect gameport */ IntT HdwC40(NOARG); /* TRUE if 40-col color video */ IntT HdwC80(NOARG); /* TRUE if 80-col color video */ IntT HdwDrv(NOARG); /* Get floppy-drive count */ IntT HdwFlg(NOARG); /* Get hardware option flags */ IntT HdwGam(NOARG); /* TRUE if game-adapter present */ IntT HdwM80(NOARG); /* TRUE if 80-col mono video */ IntT HdwMdm(NOARG); /* TRUE if PS/2 modem present */ IntT HdwMou(NOARG); /* TRUE if PS/2 mouse present */ IntT HdwNdp(NOARG); /* TRUE if coprocessor present */ IntT HdwPar(NOARG); /* Get parallel port count */ IntT HdwSer(NOARG); /* Get serial port count */ IntT CTYP MachId(NOARG); /* Get machine-id (maybe) */ IntT 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 functions ------------*/ #define mathchip() HdwNdp() #define numflop() HdwDrv() #define numpar() HdwPar() #define numser() HdwSer() #ifdef __cplusplus } #endif #endif /* _TCXLhdw_ -- End of TCXLhdw.h */