...BUT CERIOUSLY FOLKS

Keith Weiskamp

Keith Weiskamp is the author of numerous computer books including Advanced Turbo C Programming.


Product Information

"C"erious Toolkit; TSR Systems Ltd., 1600 B Main Street, Port Jefferson, N.Y. 11777; 516-331-6336. IBM PC or PS/2 and compatibles. Requires: DOS 2.0 or later; Turbo C 2.0, Microsoft 5.0, or Watcom C 6.5. Price: libraries and documentation $99; libraries, documentation, and source code $199.

If you take your C programming seriously, you're going to need a set of serious tools. Let's face it, writing the same pop-up window interface or string-handling routine over and over is a complete waste of time. To help you write more powerful C programs, TSR Systems has developed a toolkit of useful functions for the major PC-based C compilers -- Microsoft C, Turbo C, and Watcom C.

TSR's offering reduces the difficulty of adding pop-up windows and menus to your programs. In addition, you'll find the tools for accessing your PC's hardware including the screen, disk drive, keyboard, speaker, and printer a real productivity booster. For a slight additional expense ($50), you can obtain the "C"erious Toolkit Plus, which includes a set of terminate and stay resident (TSR), and hot-key routines.

What You Get

The standard "C"erious Toolkit comes complete with a library of over 100 functions and a 111-page manual. The first part of the manual is devoted to background information, such as how the tools are linked with different compilers and a brief presentation of the data structures required to support the tools. For some strange reason the Turbo C compiler is not covered. The second part of the manual provides a quick reference for each of the functions. Here, you'll find short examples that demonstrate how parameters and return values are used. Overall, I was disappointed with the manual, especially the reference section, because the examples were incomplete and hard to read. The best way to learn how to use the functions is by trial-and-error or by studying the sample programs that are included with the toolkit.

The functions are grouped into 11 categories as shown in Table 1.

Table 1: Categories of functions included with the toolkit

 Cursor                Routines for reading, moving, and displaying cursors
 Disk                  Reading the status of disk drives
 Keyboard              Low-level keyboard access
 Printing              Initialize the printer, print characters and screen
                       images
 Rectangle             Fills, moves, copies, erases, and saves rectangular
                       screen regions
 Screen I/O            Set attributes, restore and save screen images, read
                       and write characters, strings, and tokens
 Sound                 Control the PC's speaker
 String processing     Insert, delete, and search for characters; justify
                       strings
 Window                Everything you need to create dynamic pop-up windows
 Video                 Control video modes
 Miscellaneous         Internal functions, determine RAM size, read the light
                       pen, and other goodies

The tools are packed into a library that fits on one disk. I didn't review the source code version of the product, but I assume that the source files are provided on a second disk. The tools are coded in assembler and C. In general, you'll find that they're optimized for size and speed. In fact, TSR provides a menu program that was constructed with their tools and weighs in at only 7,116 bytes. A similar version of the program constructed with the popular Blaise C tools required over 35K.

With the standard version, TSR includes a demo disk that provides a set of sample programs. By working with the sample programs, I discovered some powerful applications of the tools that were not apparent from reading the manual. For example, at first glance I didn't think that features, such as pop-up menu interfaces, could be generated without a lot of work. After exploring the sample programs, however, I realized that with a little creativity and a few switch statements it could be done. You'll also find sample programs for displaying the status of disk drives, formatting strings, displaying windows, and many other goodies.

In most cases, the functions are relatively easy to use. Four header files are provided, although, most of the functions only require tproto.h.

Some Improvements

The greatest defect is the manual. Although the text seems accurate and examples are provided for each function, the type is hard to read because it's so small. I'd suggest that TSR either provide a magnifying glass with the product or reprint the manual. Also, you won't find a table of contents or an index. If you spend half of your programming time looking things up in the manual, like I do, you'll really miss the index.

The design emphasis of the tools is on speed and size. In some cases, however, the tools are too low level for my preference. That is, you need too many separate tools to construct something useful. For example, if you want to display a window with a border and a title, you'll have to call at least five different functions:

  setWind( ... );
  setAttr( ... );
  setBord( ... );
  setTitle( ... );
  strtWind( ... );

If you're displaying a lot of different windows in a program, you might want to combine some of these functions so that you can actually display a window with one or two calls.


Copyright © 1989, Dr. Dobb's Journal