Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Operator Interface

Video Output: printf()

Every DOS program that has any need for speed must write directly to the video screen memory. Our method is to replace the standard library version of the printf() function with our own. We also provide windowing, cursor positioning, colors, invisible screen-image updating (so that, for example, we can update both the main console and two channel emulation screens simultaneously), and a few other miscellaneous functions. All of these routines are available in the ??GCOMM.LIB files:

...

The belper() routine is used in Worldgroup the Major BBS to set the beeps for signup notification (SGNBEL), the page-Sysop warning (SOPBEL), and the emulation screen (EMUBEL).

...

The individual characters of the above commands may be split across different calls to printf(). There may even be intervening calls to printf() as long as the intervening calls have ansion(0) (ANSI graphics disabled). Also, the display attribute is preserved across calls to setatr() when ansion(0). All of these features enable the emulation of a single user’s channel with ANSI graphics while Worldgroup the Major BBS simultaneously updates various other information on the console. For more on how Worldgroup the Major BBS emulates multiple screens at once, see page 273.

...

        lrchar=scnbuf[scnoff(79,24)];
        lrattr=scnbuf[scnoff(79,24)+1];
Writing to Several ANSI Screens at Once

To support ANSI capability on several screens at once, you must save some internal variables. The printf() routine only supports one screen and can keep track of partial ANSI commands. To support several screens, you must save the entire curatr structure. Note that curatr is the name for a structure type as well as the name of an instance of that structure type.

...

Note: curatr.attrib is the attribute setting of the most recent setatr.

Keyboard Input: getchc()

yes=kbhit(); Has the operator pressed a key?

...

After checking the standard library routine kbhit(), Worldgroup the Major BBS uses this routine to input a single keystroke.

...

The codes that these constants represent are used in many contexts, online and offline. See AIN.H for converting incoming ANSI sequences into these keystroke codes.

Cursor

To control the video screen cursor:

...