home *** CD-ROM | disk | FTP | other *** search
- /*
- * cefunc.h
- *
- * Module for C EGA library model independent functions
- * This predeclaration file should be included in any module which uses it.
- *
- * Copyright (c) 1988-1989, Microsoft Corporation. All rights reserved.
- *
- * Revision History:
- * Tom Hensel 12/14/88 Wrote it
- *
- * Predeclaration file for C EGA library model independent functions
- * The libraries are named cefuncx.lib, where x is:
- *
- * s for small model
- * c for compact model
- * m for medium model
- * l for large model
- *
- * Note: Some file names may be too long and may cause compiler warning
- * messages. This is a tradeoff to allow the names to
- * correspond to the mouse function descriptions in
- * the Mouse Programmer's Reference Guide.
- *
- * Library function definitions
- *
- * void ReadOneRegister(pPointerData, portNumber)
- *
- * Inputs:
- *
- * int *pPointerData; Pointer for pointer/data chips
- * (Ignored for single registers)
- *
- * int portNumber; Port number
- *
- * Pointer/data chips
- *
- * 0h: CRT Controller (3?4h)
- * 8h: Sequencer (3C4h)
- * 10h: Graphics Controller (3CEh)
- * 18h: Attribute Controller (3C0h)
- *
- * Single registers
- *
- * 20h: Miscellaneous Output register (3C2h)
- * 28h: Feature Control register (3?Ah)
- * 30h: Graphics 1 Position register (3CCh)
- * 38h: Graphics 2 Position register (3CAh)
- *
- * ? = B for monochrome modes or D for color modes
- *
- * Outputs:
- *
- * int *pPointerData; Data read
- *
- * void WriteOneRegister(pointer, data, portNumber)
- *
- * Inputs:
- *
- * int pointer; Pointer for pointer/data chips
- * (Ignored for single registers)
- *
- * int data Data to write
- *
- * int portNumber; Port number
- *
- * Pointer/data chips
- *
- * 0h: CRT Controller (3?4h)
- * 8h: Sequencer (3C4h)
- * 10h: Graphics Controller (3CEh)
- * 18h: Attribute Controller (3C0h)
- *
- * Single registers
- *
- * 20h: Miscellaneous Output register (3C2h)
- * 28h: Feature Control register (3?Ah)
- * 30h: Graphics 1 Position register (3CCh)
- * 38h: Graphics 2 Position register (3CAh)
- *
- * ? = B for monochrome modes or D for color modes
- *
- * void ReadRegisterRange(pTable,
- * startingPointerValue,
- * numberOfRegisters,
- * portNumber
- * )
- *
- * Inputs:
- *
- * char *pTable; Points to table of one-byte entries (length =
- * value in CL).
- *
- * int startingPointerValue; Starting pointer value
- *
- * int numberOfRegisters; Number of registers (must be > 1)
- *
- * int portNumber; Port number
- *
- * 0h: CRT Controller (3?4h)
- * 8h: Sequencer (3C4h)
- * 10h: Graphics Controller (3CEh)
- * 18h: Attribute Controller (3C0h)
- *
- * ? = B for monochrome modes or D for color modes
- *
- * Outputs:
- *
- * char *pTable; Each entry is set to the contents of the
- * corresponding register.
- *
- * void WriteRegisterRange(pTable,
- * startingPointerValue,
- * numberOfRegisters,
- * portNumber
- * )
- *
- * Inputs:
- *
- * char *pTable; Points to table of one-byte entries (length =
- * value in CL). Each entry contains the value
- * to be written to the corresponding register.
- *
- * int startingPointerValue; Starting pointer value
- *
- * int numberOfRegisters; Number of registers (must be > 1)
- *
- * int portNumber; Port number
- *
- * 0h: CRT Controller (3?4h)
- * 8h: Sequencer (3C4h)
- * 10h: Graphics Controller (3CEh)
- * 18h: Attribute Controller (3C0h)
- *
- * ? = B for monochrome modes or D for color modes
- *
- * void ReadRegisterSet(pTable, numberOfRegisters)
- *
- * Inputs:
- *
- * char *pTable; Points to table of records with each entry
- * in this format:
- *
- * Bytes 1-2: Port number
- *
- * Pointer/data chips
- *
- * 0h: CRT Controller (3?4h)
- * 8h: Sequencer (3C4h)
- * 10h: Graphics Controller (3CEh)
- * 18h: Attribute Controller (3C0h)
- *
- * Single registers
- *
- * 20h: Miscellaneous Output register (3C2h)
- * 28h: Feature Control register (3?Ah)
- * 30h: Graphics 1 Position register (3CCh)
- * 38h: Graphics 2 Position register (3CAh)
- *
- * ? = B for monochrome modes or D for color modes
- *
- * Byte 3: Pointer value (0 for single registers)
- *
- * int numberOfRegisters; Number of registers (must be > 1)
- *
- * Outputs:
- *
- * char *pTable; Byte 4: EGA Register Interface fills in data
- * read from register specified in bytes 1-3.
- *
- * void WriteRegisterSet(pTable, numberOfRegisters)
- *
- * Inputs:
- *
- * char *pTable; Points to table of records with each entry
- * in this format:
- *
- * Bytes 1-2: Port number
- *
- * Pointer/data chips
- *
- * 0h: CRT Controller (3?4h)
- * 8h: Sequencer (3C4h)
- * 10h: Graphics Controller (3CEh)
- * 18h: Attribute Controller (3C0h)
- *
- * Single registers
- *
- * 20h: Miscellaneous Output register (3C2h)
- * 28h: Feature Control register (3?Ah)
- * 30h: Graphics 1 Position register (3CCh)
- * 38h: Graphics 2 Position register (3CAh)
- *
- * ? = B for monochrome modes or D for color modes
- *
- * Byte 3: Pointer value (0 for single registers)
- *
- * Byte 4: Data to be written to register
- * specified in bytes 1-3.
- *
- * int numberOfRegisters; Number of registers (must be > 1)
- *
- * void RevertToDefaultRegisters()
- *
- * void DefineDefaultRegisterTable(pTable, VGAColorSelect, portNumber)
- *
- * Inputs:
- *
- * char *pTable; Points to table of one-byte entries.
- * Each entry contains the default value
- * for the corresponding register. The table
- * must contain entries for all registers.
- *
- * int VGAColorSelect; This should be 'TH' (5448h) if the VGA color
- * select register is defined, otherwise
- * this value should be any value other than
- * 5448h.
- *
- * int portNumber; Port number
- *
- * Pointer/data chips
- *
- * 0h: CRT Controller (3?4h)
- * 8h: Sequencer (3C4h)
- * 10h: Graphics Controller (3CEh)
- * 18h: Attribute Controller (3C0h)
- *
- * Single registers
- *
- * 20h: Miscellaneous Output register (3C2h)
- * 28h: Feature Control register (3?Ah)
- * 30h: Graphics 1 Position register (3CCh)
- * 38h: Graphics 2 Position register (3CAh)
- *
- * ? = B for monochrome modes or D for color modes
- *
- * void InterrogateDriver(pfDriverExist,
- * pMajorVersion,
- * pMinorVersion,
- * pVersionNumberSegment,
- * pVersionNumberOffset
- * )
- *
- * Outputs:
- *
- * int *pfDriverExist; FALSE (0) if EGA interface loaded,
- * else TRUE (!0)
- *
- * int *pMajorVersion; Major release number if EGA interface loaded
- *
- * int *pMinorVersion; Minor release number (in 1/100ths) if EGA
- * interface loaded
- *
- * int *pVersionNumberSegment; Segment of pointer to EGA Register Interface
- * version number
- *
- * int *pVersionNumberOffset; Offset of pointer to EGA Register Interface
- * version number
- *
- */
-
- void ReadOneRegister(int *, int);
- void WriteOneRegister(int, int, int);
- void ReadRegisterRange(char *, int, int, int);
- void WriteRegisterRange(char *, int, int, int);
- void ReadRegisterSet(char *, int);
- void WriteRegisterSet(char *, int);
- void RevertToDefaultRegisters(void);
- void DefineDefaultRegisterTable(char *, int, int);
- void InterrogateDriver(int *, int *, int *, int *, int *);
-