home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / dmkit / flat / vector.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-31  |  2.4 KB  |  37 lines

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