Introduction MTB Statements File System Compiler Applications Reference Guide Index

Creating Custom Lookup Programs

The following information is for programmers who want to create custom lookup programs for the Comet Help System.

The Comet Help System lets you use the following lookup programs:

The Comet Help System gives you a convenient way to write custom lookup programs. If the link has been established, the user can invoke a lookup program at any data entry field.

Your lookup programs run as Comet subprograms, meaning that they are executed with and ENTER statement and must end with an EXIT statement (not a RUN statement).

See the Subprograms page for more information.

In addition, your lookup programs have full control of the video screen while they are running, allowing for the possibility of overwriting the existing display. For this reason, we suggest that you use windows with your lookup programs.

See the Comet windows page for more information.

To assist you in writing lookup programs, Comet passes several parameters to the lookup program. These items include:

  1. the name of the object program being run in your partition
  2. the current execution address (in hex)
  3. the starting screen position of the current data entry field (in hex, byte 1=column, byte 2=row)
  4. the current cursor position (in hex, byte 1=column, byte 2=row)
  5. the size of the input field (in hex)
  6. the length from the start of the field to the current cursor position (in hex)
  7. the contents of the input field
  8. several flags reserved for future use
  9. HELPKEY$ value (4 bytes)
  10. NAME OF Lookup Table or Custom Lookup Program
  11. upper corner of lookup window (in hex, byte 1=column, byte 2=row)
  12. lower corner of lookup window (in hex, byte 1=column, byte 2=row)
  13. colors for lookup window (in hex, byte 1=foreground, byte 2=background, byte 3=invisible, byte 4=border, byte 5=entry)

This data is initially passed through the user buffer to the NOVA program. Your lookup programs can access this data through the COMMON variables declared in the NOVA program. See the XHELPCM usefile in the utility program source directory.


The NOVA System