╔════════════════════════════════════════════════════╗
║                   H E L P M A T E                  ║
╟────────────────────────────────────────────────────╢
║ An 8086/8088 assembly-language module which can be ║
║ linked, with Q-BASIC, to provide context-sensitive ║
║ advice and information in programs.                ║
╚════════════════════════════════════════════════════╝

This  version of  HELPMATE was designed,  as a Library
module,  for use with MicroSoft's LIB Library Manager,
a version of which  is supplied with DOS, Quick BASIC,
and all MicroSoft languages.  Assembler programs to be
incorporated  into  such libraries  must be  assembled
using the Macro Assembler MASM. If the module is to be
called from  Q-BASIC, it must be declared, explicitly,
at the beginning of your program text.

The  assembler source code  for the  HELPMATE  program
is named HELPMATE.ASM. It was assembled, using MASM 5,
to  produce  the object file  HELPMATE.OBJ,  which was
then linked into the library by the command :

           LIB HELPMATE.LIB+HELPMATE;

Note  that it is not necessary to include the filename
extensions of the object files,  since  the  Librarian
assumes the default extension of .OBJ.

To  use the  HELPMATE.LIB  Library  module  with  your
Q-BASIC programs, you must do two things :


1)  The following external function definition must be
    included at the beginning of your program :

    DECLARE SUB HelpMate (Context%, Topic$)   where ..

    CONTEXT%  is the context-sensitive flag. If set to
              1, then the routine attempts to load the
              file specified by ...
    TOPIC$    A legal DOS filename (up to 8 characters
              without extension), specifying the Topic
              file to be displayed.

If Context% is not set,  (or Topic$ is a null string),
then the routine displays a list of topics, from which
you can make your own selection.


2)  When linking the finished program, instruct the
    linker to include the HELPMATE.LIB library module
    in the target .EXE file, using the command :

    LINK progname,,,HELPMATE.LIB

    Where 'progname' is the name of your own program.

You can,  of course, include more than one .LIB module
in the command line which links your program. HELPMATE
when  assembled,  keeps all of its data  and  internal
buffers in the Code Segment, and uses less than 6K.



To invoke HELPMATE from anywhere in the program, issue
the statement:

        HelpMate Context%, Topic$

If  Context% is set,  HELPMATE will display the  first
page of the Topic file specified,  otherwise it begins
by  overlaying the current screen with a popup  window
on which is listed those HELP topics available.

The first topic in the list is highlighted and you can
move the highlight around the menu with the arrow keys
Highlight the topic you want,  then press the <RETURN>
key. The first page of that topic will be displayed in
the HELP window.

Page backwards and forwards through the file using the
<PG UP> and <PG DN> keys.  If you page past the end of
the file you will be returned to the topic list, where
you can either select another topic, or press <ESC> to
return to the Q-BASIC program. On return, the original
screen and all current variables are restored, intact,
and program execution will continue with the statement
following the procedure call.

You can  CALL HELPMATE  from anywhere in your program,
provided that the proper declaration, listed above has
been previously executed.  Appropriate places to issue
the function call are within  menus and in loops where
the program  is idling, whilst waiting for  a keypress
from the user, e.g.


F1$ = CHR$(0) + CHR$(59): ' Scan Code for <F1> key

Menu:
        DO
            R$ = INKEY$
        LOOP WHILE R$ = ""
        SELECT CASE R$
            CASE F1$
                HelpMate 1, "OPTIONS"
                  .
             other selections
                  .
            CASE ELSE
        END SELECT
    GOTO Menu

┌────────────────────────────────────────────────────┐
│                    HELP FILES                      │
└────────────────────────────────────────────────────┘

HELPMATE reads the information it presents, from a set
of Topic files which it looks for in a directory HELP,
a sub-directory of the currently logged directory.

Topic files are distinguished  by having the extension
.HLP.  Their filenames, less extension,  are the topic
names which HELPMATE lists in it's opening menu.

HELPMATE  will only list the first sixty such files it
finds. Any further .HLP files are ignored.

You can  create your own Topic files,  using any word-
processor or text-editor which can produce plain ASCII
text files. WordStar in nondocument mode or NutCracker
are good examples. Note that  HELPMATE  displays topic
files sixteen lines at a time and  window lines are 54
characters wide  (not including the cr/lf characters).
Bear this in mind when formatting your text, to ensure
a neat presentation.

HELPMATE is intelligent enough to be able to tell when
its host system has a CGA graphics board installed and
displays the window in  the appropriate  bank of video
memory.  In a monochrome system,  text is displayed in
Inverse video. In CGA systems the screen is in colour.




The program provides a useful extension to Q-BASIC and
should enhance the attraction, to the end-user, of any
software which incorporates it.

Christy Gemmell	                         24th May 1988
