home *** CD-ROM | disk | FTP | other *** search
- //** This is the biggest damned hack I've ever seen under DPMI. As if there
- //** aren't enough hacks as it is. Since it is required that we be able
- //** to execute some real-mode code (like DIGPAK and MIDPAK) even though
- //** we are in proteted mode, it is necessary to get into real-mode.
- //** The problem is that DIGPAK and MIDPAK are initialized and de-initialized
- //** through a indirect far call to a jump table. Normal funtion 301h of
- //** the DPMI services int 31h would take care of this. But the 4GW 'royalty
- //** free' DOS extender that comes with Watcom doesn't support this most basic
- //** function. Meaning there is no way, from protected mode, that we can call
- //** a real-mode far procedure. Therefor I have created, as a place holder, the
- //** 'vector manager'. This attaches to the INT 66h vector PRIOR!!!! to any
- //** DIGPAK/MIDPAK installation. This is accomplished by stomping on the INT
- //** 66h vector and simulating a real-mode interrupt, which 4GW supports.
- //** However, even this method of installing the interupt is dangerous.
- //** It is only a placeholder until a better system can be devised. Once
- //** installed the VECTOR manager now provides a service that will let us
- //** peform a far real-mode procedure call.
- //** The vector manager requires the presence of VECTOR.COM in the directory
- //** which is the tiny real-mode interrupt vector hook. This is all black
- //** boxed and handled by the LOADER.C program which handles dynamically
- //** loading and unloading DIGPAK and MIDPAK drivers.
- //** Note: both DIGPAK and MIDPAK are capable of operating as a DOS real-mode
- //** TSR. If LOADER finds both DIGPAK and MIDPAK in memory as a TSR it will
- //** use the resident portion rather than trying to dynamicall load the
- //** versions specified.
- extern int cdecl InstallVector(char *vect); // Install far call vector manager.
- extern int cdecl RemoveVector(void); // Remove vector manager.
- /* */
- /* Written by John W. Ratcliff (c) 1994 */
- /* Compuserve: 70253,3237 */
- /* Genie: J.RATCLIFF3 */
- /* BBS: 1-314-939-0200 */
- /* Addresss: */
- /* 747 Napa Lane */
- /* St. Charles, MO 63304 */
- /* */
-