KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q44273: Facts About MSHERC.COM; Why Hercules Support Must Be TSR

Article: Q44273
Product(s): See article
Version(s): 1.00 1.01 2.00
Operating System(s): MS-DOS
Keyword(s): ENDUSER | s_c | mspl13_c
Last Modified: 31-MAY-1989

MSHERC.COM is a TSR (Terminate and Stay Resident) graphics driver that
is supplied with Microsoft QuickC, QuickBASIC, and the C Compiler. It
provides high-resolution graphics capability (720 x 348, 2 colors) for
the popular Hercules graphics adapter. MSHERC.COM was written in-house
at Microsoft, and first shipped as QBHERC.COM with QuickBASIC. It is
provided, in compiled form, with the above-mentioned packages, and may
be distributed by programmers writing market applications with one of
these languages.

Four of the most common questions regarding MSHERC are as follows
(this question is usually generated by one of the following three):

1. Is the source code available? Under no circumstances. Releasing the
   source code for MSHERC would limit the development team's ability
   to change the application for increased efficiency at some time in
   the future (implementation change, with the user interface kept as
   it is).

2. Why can't Hercules support be done with a BIOS call, like any other
   video support?

   The Hercules card is not part of the IBM standard. There is no BIOS
   support. The card is easily programmable, and the manuals that
   ship with a TRUE Hercules card explain in detail how to program for
   the card. Clone cards frequently do not provide this information.
   The MSHERC driver does the translation for the card, in a fashion
   that is transparent to the user.

3. Can I build MSHERC into my program, so that I don't have to ship
   the driver with my program?

   No. The reason that this is a common question is that most
   individuals don't realize that the driver is an active TSR, and not
   just a sequence of initialization code for the Hercules Card. It
   would be possible to build this support into each of the routines
   in the graphics library, but it would involve quite an increase in
   the size of each routine, since every time that a routine did a
   BIOS call for graphic output, an alternate jump would have to be
   added to a routine that performed the same operation via the
   Hercules card. To build in this functionality would require the
   rewriting of many graphics functions. Although the run-time source
   to C 5.10 is available, this does not include any of the graphics
   routines.

4. Can I use the System or spawn commands to call MSHERC from within
   my program, so that I don't have to load it independently?

   No. The C and QuickC compilers do memory initialization at start-up
   time. At this time, memory that has been allocated through DOS
   (such as a device driver or TSR program) is passed to the compiler.
   Going back to DOS via a System call and loading a TSR is a very
   risky proposition, because the compiler will have no knowledge of
   this operation. Possible consequences include memory fragmentation,
   memory overwrites, and hanging. Also, the hardware configuration
   is checked during start-up initialization. Therefore, after
   start-up has confirmed that no Hercules card is present, loading
   MSHERC.COM would not do any good.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.