home *** CD-ROM | disk | FTP | other *** search
- //=====================================================================
- //
- // dosext.h
- //
- // interface to loader / dos extender
- //
- // Copyright (c) 1994, Kevin Morgan, All rights reserved.
- //
- //=====================================================================
- #ifndef __DOSEXT_H__
- #define __DOSEXT_H__
-
- #ifndef __DOS_H__
- #include <dos.h>
- #endif
- #ifndef __DPMISH_H__
- #include "dpmish.h"
- #endif
-
- #define EXTENDER_VECT 0x61
- #define _EXTENDER_VECT 61h
-
-
- #define EXAPI_INSTALL 1
- #define EXAPI_REMOVE 2
- #define EXAPI_INITCOMM 3
- #define EXAPI_TERMCOMM 4
- #define EXAPI_READCOMM 5
- #define EXAPI_WRITECOMM 6
-
- class CommRequest
- {
- public:
- char far *buf;
- int bufcnt; // number to write or read
- int iocount; // number written or read
- int status;
- CommRequest(char far *aBuf=0, int aCount=0) :
- buf(aBuf), bufcnt(aCount), iocount(0), status(0) { }
- };
-
-
-
- class DosExtender {
-
- public:
- DosExtender() { }
-
- int installIntHandler(int, DpmiInterruptVector, unsigned&);
-
- void removeIntHandler( unsigned );
-
- void initComm(int, int, int);
-
- void termComm(int);
-
- void readComm(int, CommRequest far *);
-
- void writeComm(int, CommRequest far *);
- };
-
- extern DosExtender dosX;
-
- #endif