CUG CD-ROM Vols. 420-439

(CUG 420A) VGAMAZE in 3-D

James L. Dean (New Orleans, LA) contributes his VGAMAZE tools written for MS-DOS VGA graphics with the Borland C++ 3.0 compiler. VGAMAZE displays mazes with square (SQRMAZE.CPP) or hexagonal rooms (HEXMAZE.CPP) in three dimensions on your monitor. It includes a template for one dimensional virtual arrays. The plotting class can plot any surface z=f(x,y). An example program for surfaces (SPIKE.CPP) demonstrates that its good for more than just mazes. The CUG Library distribution includes all C++ source code and executables for SQRMAZE, HEXMAZE, and SPIKE. VGAMAZE version 4 (as released on 02/27/94) is immediately available as CUG Library volume #420A.

When you start a maze program, you will be prompted for an 8 (or fewer) character random number seed. Usually, a different random number seed will produce a different maze. After the maze is displayed, press S to see the solution. Fig. 1 shows square maze fully generated, but before the solution is overlaid. Then, you can press any key to exit. A VGA (or SVGA) graphics card, a VGA monitor, and about 2 MB of expanded memory or disk space are needed (for virtual memory).

VGAMAZE supports only the Large memory model. Because VGA3D.CPP uses it, main programs must be linked with Borland's GRAPHICS.LIB. See the Borland documentation on the utilities BINOBJ and TLIB for information on including EGAVGA.BGI in GRAPHICS.LIB.

Be advised that VGAMAZE performs an extreme amount of floating point arithmetic and probably should not be run without a math coprocessor. On my Cyrix 80486DLC 40Mhz machine (without math coprocessor) I waited for 28 minutes for VGAMAZE to complete its work. On a Pentium P5 120Mhz machine, the same maze required only 40 seconds.

For HEXMAZE, do not optimize invariant code motion if you optimize common subexpressions; a bug in Borland C++ 3.0 causes incorrect code to be generated.

(CUG 420B) Coerce graphics file converter for Unix

Tatsurou Sekiguchi (Department of Information Science, University of Tokyo, Japan) submits his Coerce program which can convert many graphic file formats popular on BBSes in Japan. Specifically, it converts from one of MAG, PI, PIC, MAKI, PPM, PBM, ML1, and beta formats to one of MAG, PI, PIC, PPM, and beta formats. Coerce can be compiled on any Sun workstation running SunOs 4.1.3 with GNU C++ 2.4.5 or later. Others have reported good success compiling Coerce on MIPS and RS/6000 machines. Sekiguchi also includes source for a simple X Windows bitmap viewer. Coerce (as released on 02/24/94) is immediately as CUG Library volume #420B.

"Beta format" is an internal representation of graphic images in coerce, which is very similar to VRAM images of X68000 (SHARP) or FM-TOWNS (Fujitsu). The format is often used for debugging. PBM is the Portable BitMap format and supported by a wide range of systems. Coerce is aimed to accelerate traffic of graphic images between BBS and Internet.

Coerce is a synthesis of all converters, which can be used as an alternative of each converter. For instance, in order to convert `mag' format to `pic' format, type

        % coerce -mag +pic foo.mag

Options of coerce:
-{mag,pi,pic,maki,ppm,pbm,ml1,beta} specify the format of input images.
+{mag,pi,pic,ppm,beta} specify the format of output images.
-notadjust      prevents adjusting an aspect ratio of pixels for `pic'
                format images.
-stdin          indicates an input image is read from standard input.
-stdout         indicates the result is sent to standard output.
-o [name]       specified the output file name.
-quiet          prevents messages from being written.

Porting to other environments and other machines is welcomed. Any trial to incorporate new facility to save/load another format images is also welcomed. There is already a patch for `xv' which enables it to load `mag' and `pic' format images. It is an interesting attempt to combine `coerce' with `xv'.

Coerce includes a part of source files of PiFM ver 0.16 which was written Takashi Nawashiro. Separate permission was obtained to use and redistribute it. Sekiguchi waives the copyright on this software. He allows that you can use/modify/redistribute this package freely, even for commercial purpose. The author can be reache by Internet email as

(CUG 421) RFV VGA Graphics Animation Demo

Thomas Hagen (Trondheim, Norway) contributes his RFVDEMO collection of high-speed VGA animation demonstrations for MS-DOS. The animations require the Borland C++ 3.1 compiler. There are four main animation demonstrations included: bitmap-rotation routine, fractal zoomer, plasma, and voxelspace routine. These are in addition to lower-level support routines for keyboard handling, timer class, and others. RFVDEMO version 0.1 (as released on 01/17/94) is immediately available in a three disk set as CUG volume #421.

I was particularly impressed with speed of these demonstrations on my Cyrix 80486DLC 40Mhz machine (without math coprocessor). The bitmap rotation appeared seamless without flicker. The fractal zoomer showed the Mandelbrot set at a breathtaking speed faster than some fractal videotaped productions I've seen. A utility called MAKEFRAC is also included so you can design your own fractal animation sequences. The plasma literally oozes and flows across your screen (see Fig. 2). Last, the voxelspace uses shading and perspective to give you a realtime flyby over imaginary terrain (see Fig. 3).

RFVDEMO requires an 80386 or better CPU (486 recommended) and a register-level compatible VGA-card. If you want to run the MAKEFRAC designer, you'll need a 1MB SVGA. The programs have fairly heavy MS-DOS low memory requirements of 500 to 600KB.

Hagen mentions that documentation has been kept to its bare minimum. He writes: "The one thing you WON'T find, though, is verbose comments. You're pretty much on your own here!". Licensing is equally informal since the source code has been released into the public domain. Hagen asks only for a postcard if you find the source code useful.

(CUG 422) MICRO-C C Compiler

Dave Dunfield (Nepean, Ontario, Canada) submits an entire suite of tools from the MICRO-C C compiler development system. This includes the MICRO-C C compiler itself for MS-DOS, more than 85 useful sample programs with full C source, and a demonstration version of MICRO-C for embedded systems. MICRO-C is a tiny compiler which can run with less than 32k RAM and yet is highly independent of CPU and OS. Specifically, platform support is available separately for 68HC08, 6809, 68HC11, 68HC12, 68HC16, 8051/52, 8080/8085, 80x96 and 8096 CPU's, as well as the "C-FLEA" (a portable C virtual machine supporting any processor). The CUG Library distribution includes a fully functional MICRO-C compiler executable built for the MS-DOS 80x86 environment. This version generates code in .ASM format so Microsoft MASM, Borland TASM, or equivalent are required (not included). MICRO-C version 3.14 (as released on 09/22/95) is immediately available as CUG #422.

MICRO-C provides much more functionality than Small-C and its many derivatives. Specifically, MICRO-C supports all C statements, operators, and preprocessor directives as well as in-line assembler. MICRO-C includes data types for int, char, unsigned, struct, union, pointers, and typecasting. Saying it another way, MICRO-C gives you everything possible except for typedef, long, double, float, enumerated, and bit fields. The runtime library does include a long arithmetic package with arbitrary precision up to 256 bits.

Even if you're not especially interested in the MICRO-C compiler, you may wish to take advantage of the collection of more than 85 sample programs. Although there are simply too many to catalog here, I've listed a two dozen of the most interesting:

CCREF'C' source cross referencing program
COMEXTExtract comments from 'C' sources
OBSCUREMake 'C' program un-readable (but it still compiles)
PPCPretty Printer for 'C' (source formatter)
CALCA TSR programmers (HEX/DECIMAL) calculator
CMOSRead/Write/Verify CMOS RAM from/to/with disk file
CSETTSR map of IBM PC character set
DIFFDisplays differences between text files
GREPLike unix "GREP" search utility
HEMHardware Exception Monitor TSR to trap unexpected ints
LZCLaser commander TSR to control HP compatible printers
MEMSAVESaves memory image to file
MTERMTiny (10k!) TSR ANSI terminal with XMODEM
SHOWEXEDisplays information about a .EXE file
TFBTSR File Browser
VALIDATEPD ver of McAfee's validate. Verify files with two CRC's
LAPTALKA terminal program with script interpreter
XMODEMExternal file transfer program
MICROCADMouse based drawing program
FEFont Editor
ASM868086 assembler
BASICA simple BASIC interpreter
DIS858085 Cross Disassembler
TTT3D3 dimensional tic-tac-toe

The PC compiler is completely "FREE" in the sense that no payment is required, and you may do whatever you like with your own programs compiled with it. That is, you still can't re-sell the tools, but you can use them in any way that you like. An optional $25 registration the latest copy, the source code to the libary, and a few other goodies. Highlights of version 3.14 include:


The CUG Library has always accommodated C/C++ archives both big and small. This month, I've compiled an anthology of five outstanding but small source archives. William Pierpoint (Camarillo, CA) submits his comprehensive library for stream-style record I/O. Karl Hahn (Sarasota, FL) contributes a MIME binary encode/decode routines for use with email tools. Philip Erdelsky (San Diego, CA) releases both source for general ledger posting with 32-bit math library and a Re-entrant DOS-Compatible File System for embedded systems. Last, Keith Vertanen (Pine Springs, MN) sends his brief but succinct implementation of the BSPLINE rendering algorithm. Again, all five archives are immediately available on a single diskette as CUG volume #423.

(CUG 423A) RECIO: record input made easy

The RECIO library contains more than 50 functions and macros enabling file input where each line becomes a data record, and each record is subdivided into fields. Fields may be either character delimited or column delimited. The learning curve is simplified since many functions are based on analogous counterparts in stdio. RECIO is freeware and is protected by the GNU Public License. RECIO version 2.00 (as released 04/16/94) appears along with several unrelated archives on CUG volume #423.

Since virtually every program has to do input or output, the stdio library is very familiar to C programmers. Many functions in the recio library are analogous to the stdio library. This makes the learning curve easier.

Analogous stdio/recio components
fscanfrgeti, rgetd, rgets, ...

RECIO includes a makefile only for Borland Turbo C, although other platforms should work too.

(CUG 423B) MIMEQP a better encode/decode for email

MIMEQP encodes files that are mostly ASCII but contain some non-ASCII characters so that the encoded file is all ASCII. The characters that were ASCII remain so, so that the encoded file is human-readable. MIMEQP encoding also limits line lengths to 72 characters. It is useful for sending files that may contain non-ASCII through mail servers. MIMEQP (or MIME Quoted-Printable) is defined in RFC 1341. MIMEQP (as released on 05/22/93) appears along with several unrelated archives on CUG volume #423.

MIME is an acronym for Multipurpose Internet Mail Extensions. It builds on the older standard by standardizing additional fields for mail message headers that describe new types of content and organization for messages.

MIME allows mail messages to contain:

Encoding replaces all control characters except \n and \t, all ='s, and all characters whose ASCII code is greater than 127 with =XX where XX is the hex value of the ASCII. A substantial overview of the MIME standard by Mark Grand along with an MS-DOS executable is included with the CUG Library distribution.

(CUG 423C) ACCTPOST simplifies General Ledger

The Plain Vanilla Posting Program II is a simple program that takes over three tedious accounting tasks: posting from the general journal to the general ledger, drawing a trial balance, and putting account balances into a report. The Plain Vanilla Posting Program II was written for the Compact memory model (near function, far data) in Turbo C 2.0 for MS-DOS. The author claims some source portability to Unix variants as well. The Plain Vanilla Posting Program II (as released on 09/01/90) is included with unrelated source archives on CUG volume #423.

The only non-portable part of the program appears in ARITHMET.C, which contains embedded assembler code. This allows us to catch arithmetic overflows, which would be disastrous for an accounting application if undetected. Otherwise, it's just a simple 32-bit arithmetic package with only five operations: addition, negation, multiplication and division by 10, and the computation of the remainder when a 32-bit number is divided by 10. The last two operations cannot produce overflows and might have written in standard C. Porting to a machine with native 32-bit arithmetic should be simple.

Although the Plain Vanilla Posting Program II is copyrighted, there remains only one restriction. You may not sell the program or any program derived from it. You may give it away or charge a reasonable fee for media duplication, but may not charge anything for the software itself.

(CUG 423D) RDCF: Re-entrant DOS-Compatible File system

RDCF is a reentrant and ROMable DOS-compatible file system designed for use with floppy diskettes and hard disk partitions that do not exceed 32 Mbytes in size. Also included is a simple disk caching package designed for use with RDCF. However, it may also be used separately. A DOS utility called FILES, written primarily to test RDCF, is included in both source and executable form. It performs a number of operations on DOS files, including some that cannot be performed from the DOS command line. For example, its DIR command shows the remains of deleted files.

Complete C source code and documentation are included, including a fairly detailed description of the DOS file system.

RDCF is copyrighted, but it is freeware. You may copy it and pass it on freely, as long as you pass on the entire, unmodified package, with its copyright notices intact. You may not resell it, although you may charge a reasonable fee for diskette duplication, shipping and handling.

(CUG 423E) Classic BSPLINE rendering algorithm

The spline is a mathematical construct from numerical analysis which is used to fit a curve to an arbitrary set of points. It has obvious uses in statistics and computer graphics rendering. For a description of spline theory and algorithm implementation, see "Elementary Numerical Analysis" by Kendall Atkinson (1985, Wiley & Sons). The BSPLINE archive uses polynomial interpolation to return an array of coefficents to describe it. BSPLINE was written in C++ for the Borland compiler though it uses few, if any, features of C++. The library uses function calls from the Borland Graphics Interface to render the BSPLINE on EGA or VGA displays. BSPLINE (as released on 03/11/94) is included with other unrelated archives on CUG volume #423.

(CUG 424) ED Editor: highly portable windowing editor

Charles Sandmann (Houston, TX) submits the ED editor with a user interface based on the DEC VMS EDT editor. ED is a true multiplatform editor and can be compiled and run on virtually any platform. It includes target-specific code for keyboard, screen, and TCP/IP handling. This allows it to run on Unix (IBM RS/6000, Sun Sparc, HP, NeXT or Alpha AXP machines), MS-DOS, Windows NT, and OS/2 environments with ease. ED can edit any kind of file in text, binary, or hexadecimal modes.

Some of the more interesting ED features include the following:

The ED documentation consists primarily of a 45-page ASCII help file. This help file can be invoked from within ED or searched using any standard text utilities you might have. The documentation assumes that you've had some exposure to the EDT editor that ED emulates or are willing to learn the basics.

The CUG Library distribution of ED includes binaries built with the DJGPP edition of GNU C/C++ (MS-DOS with GO32 DOS extender). Also, full C source is provided on this two-diskette set. Distribution and use of the ED source code is covered by the GNU General Public License, Version 2. ED version 1.5.7 (as released on 04/05/94) is immediately available as CUG #424.

(CUG 425a) Portable Tar: read/write files, floppies, QIC tapes

Timor V. Shaporev (Moscow, Russia) contributes an extremely versatile version of the classic Unix TAR archiver and an innovative method of delivering LZW compressed data over pipes. Portable TAR works with both MS-DOS and Unix compatible machines. Since more than half the source code available from the Internet appears in TAR format, you'll quickly find this a valuable utility. Portable TAR reads and writes archives in ordinary files, raw floppies, and QIC-02 streamer tapes. It understands regular TAR formats, PKZIP, gzip, and Unix "compress".

Portable TAR has several other advantages over most public domain TAR programs and those included with Unix compatible operating systems:

As mentioned earlier, Shaporev claims source compatability with most Unix systems and MS-DOS. Specifically, he provides two makefiles that cover most unix implementations and another makefile for Borland Turbo C in MS-DOS. As you might expect, a small amount assembly language code is provided for supporting functionality not normally found in MS-DOS.

The CUG Library distribution of Portable TAR includes binaries built for MS-DOS. Portable TAR version 3.15 (as released on 04/05/94) is immediately available on CUG #425.

(CUG 425b) LZPIPE: compression through a pipe

Shaporev's other contribution is the LZPIPE library, which implements the two most popular compression methods: LZW and "deflate". Both of these methods are de-facto lossless compression standards. LZW is used in the well-known "compress" utility and deflate is used by number of utilities starting from PKZIP by PKWare Inc. up to the GNU 'gzip' utility.

LZPIPE gives a programming capability analogous to UNIX pipes for systems like MS-DOS. It also allows access to compressed files. LZIPE provides a far simpler API than most compression utilities. Specifically, this library processes compressed data in the familiar file handle style of open(), read(), write(), and close() calls.

LZIPE implements only pure compression, no attempt is made to emulate ZIP directory services. Thus, you would use either use LZPIPE to compress one file at a time or else add the extra functionality for multi-file archiving yourself.

Source codes for both LZW compression and decompression are derived from sources of 'compress' utility initially written by Joe Orost. Source codes for deflate compression and inflate decompression are derived from Info-Zip zip/unzip utilities sources. 'Inflate' decompressor was initially written by Mark Adler and 'deflate' compressor was initially written by Jean-loup Gailly.

The CUG Library distribution of LZIPE includes only C source code. As this is strictly a library, no MS-DOS binaries are included. LZPIPE version 1.01 (as released 04/05/94) is immediately available as part of CUG #425.

(CUG 426) LPC-Parcor-Cepstrum Code Generator

Patrick Ko Shu Pui (Hong Kong) submits his LPC-Parcor-Cepstrum code generator for C. The LPC-Parcor-Cepstrum code generator (hereafter, LPC) can be built on most Unix platforms as well as Microsoft C/C++ 7.0 and Borland Turbo C v2.0. The primary use of this archive is the manipulation and normalization of audio data files. Specifically, it supports 8-bit ulaw (SUN Sparc), 8-bit and 16-bit PCM data. It then generates LPC autocorrelation or covariance coefficients, Parcor (partial correlation) coeefficients, or LPC cepstrum coefficients.

The implementation of LPC draws from algorithms and methods described by Shuzo Saito and Kazuo Nakata in "Fundamentals of Speech Signal Processing" (1985) and others.

Astute CUJ readers will recall that Patrick Ko also contributed the Small Matrix Toolbox (CUG #403) earlier this year. In fact, the LPC application includes several key components from the Small Matrix Toolbox.

The C source package included in LPC is free for academic purposes only. For commercial usage, you must send a a US$30 money order to the address to the author (Patrick Ko). The CUG Library distribution includes full C source and binaries for MS-DOS. LPC version 0.52 (as released 04/16/94) is immediately available as CUG #426.

(CUG 427) Multijoy: Multiple Joystick Interface

Christof Ruch (Clausthal, Germany) submits the Multi Joystick Interface package. This package makes it possible to connect up to six digital joysticks (Atari type) to the parallel port of your PC. For test (or two player gaming) purposes, two joysticks can be emulated by the keyboard, so you can try out the games before you actually decide to build an interface. Specifically, this archive includes instructions for building the interface, test programs for checking your interface, and Pascal and C interface routines. Several arcade type games have are already publicly available for this system, though none are included with the CUG archive.

As you may recall, the original IBM PC offered analog joystick ports on an optional interface card (see Bibliography). This joystick adapter had a fixed I/O address and could support only 2 joysticks on the PC. Furthermore, the polling of analog joysticks requires a considerable amount of wall-clock time because you must wait for the Resitance/Capacitance (R/C) circuit to dissipate after each poll. The older digital joysticks offer less resolution (only 8 possible direction indicators), but can be read with greater speed and precision.

The C version of Multi Joystick Interface works specifically with Borland C++ 3.1. The Pascal version works with Borland Turbo Pascal. The code should be portable to other platforms and only uses a few lines of inline assembler code.

Please note that the construction of the hardware interface requires you to etch your own printed circuit board (PCB). Fortunately, the archive includes a PCB layout in postscript, HP PCL, and PCX file formats. And, of course, you'll need to do some soldering to pull it all together. The interface does require power which can be supplied from your spare analog joystick port (+5VDC, GND) or from an inexpensive wall-type transformer. Ruch estimates the total cost of hardware to be about $30. Hardware construction instructions appear in both English and German lanaguages.

The Multi Joystick Interface hardware documentation and software development kit are not public domain but rather are copyrighted by Christof and Henning Ruch. However, it is free software and information. You may use it for whatever you wish, even using it to write public domain, freeware, shareware and commercial software. You may NOT however re-distribute modified versions of the source code, the executables and the documentation files. The Multi Joystick Interface version 1.1 (as released on 03/24/94) is immediately available as CUG #427.


Volkman, Victor R. "Complete Joystick Interface". The C Gazette, Vol. 5, No. 1, Autumn 1990. pp 8-21.

(CUG 428) PICTOR: Text-Mode Video Library

Jonathan Wood (Irvine, CA) contributes the PICTOR text-mode video library. PICTOR is a C callable library for MS-DOS development that provides multi-pane stacked windows, pulldown menus, and hypertext help. PICTOR is more than just video: it also includes interrupt-driven serial communications, CTRL-C and critical error handler, on-screen clock, text compression, and even a sample text editor.

The library provides many high level routines, most of which can easily be implemented in just one or two function calls. For example, the Ctrl-C, Ctrl-Break and critical error handlers are all installed (and will all uninstall automatically) with a single function call. The library also provides many low-level functions that provide support for custom routines that you create.

This package includes two sets of libraries: one for Microsoft C 7.0 and another for Borland C 3.0. Wherever practical, the library routines are ANSI C compatible; therefore, the library will link with programs compiled with C compilers from most other vendors with little or no modifications.

You may incorporate any of the copyrighted object code in executable form into your own programs, and you may use and distribute these programs royalty free, provided you include a copyright notice and that your product is substantially different than the library itself. Full licensing information is included with the archive. The PICTOR video library version 1.51 (as released on 03/15/94) is immediately available as the two-disk set CUG #428.

(CUG 429) Chess for C++, Fastclok, and KBFake

This volume combines three relatively small but powerful archives on a single diskette. Walter Karas (Cary, NC) submits C++ source code for a simple MS-DOS chess game. Astute CUJ readers will remember that Walter Karas also contributed the SORTLIST AVL algorithms last year on CUG #395. Russell Taylor (University of North Carlina at Chapel Hill) contributes archives for redirecting serial I/O and accelerating the PC hardware clock.

(CUG 429A) Chess for C++

The Chess for C++ game is very flexible in configuring both human and computer opponents. You can select either human or computer for both black and white playing sides. Thus, you can start a game with zero, one, or two human players. You can assign one of three skill levels to each computer opponent. The number of moves of look-ahead is 2 for skill level 1, 3 for skill level 2, and 4 for skill level 3.

The program display is plain ASCII text, so you might find it a little challenging to get used to (a white pawn is represented by "PW", for example). This should allow it to be ported somewhat easily to other platforms. An interested CUJ reader may wish improve on the interface with bitmap graphics of the chess pieces.

Chess for C++ is provided in source code format only so you must have a C++ compiler installed to use it. Chess for C++ version 1.2 (as released on 05/04/94) can be found on volume CUG #432.

(CUG 429B) Fastclok and KBFake

Fastclok implements a more precise time than that provided by DOS. Specifically, it provides functions to increase the clock rate to around 1165 interrupts per second. This yields a granularity of 858 microseconds between clock pulses rather than the 55 milliseconds between normal PC clock pulses (18.2 times/second).

Under the influence of Fastclok, the gettimeofday() routine acts like the Unix version, with the exception that time zone does not matter. The time is returned in timeval structures that match their Unix counterparts.

The start_fasttimer() routine must be called before the gettimeofday() routines will work and the stop_fasttimer() routine MUST be called before the program terminates or a crash will result. For this reason, start_fasttimer() installs the stop_fasttimer() routine to be called at program exit.

Fastclok is implemented entirely in C with the exception of inline assembly language to execute the CLear Interrupt enable (CLI) and Set InTerrupt enable (STI) instructions. Only source code is provided for these routines so you must have a C compiler available to use them.

KBFake is a Terminate and Stay Resident (TSR) program that redirects the input from one serial line so that incoming characters appear to have been typed on the keyboard. It works by installing an interrupt handler for the serial port that is to be used. This handler inserts the characters coming in over the serial line into the keyboard buffer using the BIOS keyboard write call.

The code for this program is a mixture of the example for the keep() function call in Borland C and various programming examples from the SIMTEL internet FTP site. The keep() function call does not have a direct replacement in Microsoft C/C++.

This is an interrupt service routine. Accordingly, you MUST compile it with Test Stack Overflow disabled to get an executable file which will operate correctly. The CUG distribution of KBFake includes both C source and an MS-DOS executable.

(CUG 430) m68kdis: Motorola M68000 thru M68030 disassembler

Christopher G. Phillips (University of Texas at Austin) submits his "m68kdis" disassembler for the Motorola 68000 family of CPU chips. Disassemblers are system software that accepts a binary executable as input and produces assembly language source as output. Specifically, m68kdis supports the full instruction sets of the 68000, 68008, 68010, 68020, and 68030 CPU chips. Additionally, m68kdis decodes instructions for the 68851 Paged Memory Unit and the 68881/68882 Floating-Point Coprocessors. The Motorola 68000 family chips power millions of computers including the Macintosh, Atari, Amiga, and many embedded CPU industrial applications. The CUG Library edition of m68kdis includes full source in C (no executables are provided). The m68kdis disassembler is immediately available as CUG volume #441.

Since m68kdis is portable, it is actually a cross-disassembler. For example, you can disassemble 68000 programs on a variety of host CPUs from PCs to Unix machines. Phillips provides a very clean Makefile without any OS specific flags or options. Additionally, he takes care to avoid common pitfalls such as dependencies on the size of the int data type.

Read the full-length review!

(CUG 431) DOSRIFS: Share hard disk or CD-ROM drives

Kyle A. York (McGraw Hill School Systems) submits his Remote Installable File System for DOS. The Remote Installable File System provides a LAN linking two computers through the serial port so they may share resources. RIFS installs itself as a TSR using the MSCDEX convention for installable file systems. Shareable resources are currently limited to available disk drives including hard disks, CD-ROM, and network drives. RIFS also supports the redirection of a client parallel port to a file or device on the server. RIFS supplies 32-bit Cyclic Redundancy Check (CRC) to guarantee error-free file transfers. The CUG Library distribution includes full source in C and ASM as well as MS-DOS executables. RIFS for DOS (released 10/08/94) is immediately available as CUG volume #431.

Read the full-length review!

(CUG 432A) PTMID: MIDI/MOD converter

Andrew Scott (Mosman Park, Australia) submits his PTMID music conversion utility. Specifically, PTMID takes General MIDI files (format 0 or 1) and converts them to Protracker MOD files or Multitracker MTM files. As you may know, MIDI files are industry standard, but need some sort of sequencer to be played. This is because there can be near-infinite simultaneous notes present (though about 20 is a standard maximum). Protracker files are 4 channel (though 6, 8, or more can be supported) files, but have a bank of digitized instruments included. This allows reasonable quality sound to be produced given limited hardware. Multitracker files are similar to MOD files and support up to 32 simultaneous notes. PTMID version 0.3 (released on 07/18/94) is immediately available on CUG Library volume #432A.

The CUG Library distribution includes a MS-DOS executable as well as complete source code in ANSI C. The source can be recompiled using Borland C 2.0 (or later). The Makefile builds a Small memory model program, though other models may be possible. The documentation appears in the form of a six-page Unix man file. Some background in digital music is a prerequisite to getting the best results from the code. PTMID is distributed with a license reminiscent of the GNU Public License. Specifically, you may not resell the program, all redistributions must include PTMID source, and anything built using the PTMID source must include a notice that parts are derived from it.

(CUG 432B) WildFile: shell-style wildcard filename

John Kercheval (Seattle, WA) contributes his WildFile library that provides Unix shell style wildcarding in MS-DOS executables. Wildcarding means the ability to take a description like "foo*.c" and return a list of matching filenames (e.g. foobar.c, foofoo.c, etc.). By default, MS-DOS programs can accept the support for arbitrary string ("*") and single character ("?") wildcarding if they use the INT 21h service functions FindFirst and FindNext. WildFile starts with this level of support and adds on regular expressions using pattern primitives such as positive closure ("+"), character range ("[ ]"), and character negation ("!" or "^"). WildFile v1.20 (as released on 01/07/92) is immediately available on CUG Library volume #432B.

Here are some examples of legal WildFile expressions and results:
"*t*"would match to the filenames test.doc,, itsy.bib, foo.tic, etc.
"th?[a-eg]."would match to any file without an extension, whose first two letters were "th", with any third letter and whose last letter was a,b,c,d,e or g. (ie. thug, thod, thud, etc.)
"*"would match all filenames.
"f[!a-l]o*"would match foo*.* but not fao*.* through flo*.*

WildFile documentation consists mainly of a series of concatenated release notes for versions 1.00 through 1.20. WildFile has been developed and compiled using both MicroSoft C V6.00A and Borland C++ 2.00. Kercheval has generously dedicated WildFile to the public domain.

(CUG 433)SVGACC: MS-DOS Graphics Library

Stephen L. Balkum and Daniel A. Sill (Zephyr Software, Austin, TX) submit their MS-DOS real-mode SVGA graphics library for MSC, Borland C, and Symantec C/C++. SVGACC provides an easy interface to the high resolution/high color video modes of the newer SVGA video cards. There has been no standard for VGA video cards above the 320x200x256 resolution. Instead, each video card manufacturer has implemented a slightly different method to access these high resolution/high color video modes. SVGACC automatically identifies the video card and its installed memory. Users may write graphics programs that will work on most any SVGA card without writing specific versions for each individual SVGA card. Over 100 functions support sprite animation, drawing primitives, fills, 3-D views and much more. SVGACC is written in 100% assembly language and uses 80386 32-bit registers for the best possible speed. SVGACC version 2.1 (as released on 05/09/94) is immediately available as CUG volume #433.

SVGACC specifically supports the following SuperVGA graphics cards:
Acumos NCR
Avance Logic Oak Technologies
ATI Technologies Realtek
Ahead Paradise/Western Digital
Chips and Technologies Primus
Cirrus Logic Trident
Everex Micro Enhancer Tseng Labs
Genoa Video 7

* All VESA compatible SuperVGAs (version 1.00 and greater)

The maximum resolution depends on the video card, its installed memory, and monitor. Most VGA video cards support the 320x200x256 and 640x400x256 video modes. 512k of video memory is required to support the 640x480x256 and 800x600x256 video modes. 1 meg of video memory is required to support the 1024x768x256 video mode. 2 meg of video memory is required to support the 1280x1024x256 video mode.

The SVGACC documentation consists of the comprehensive Reference Manual (270 pages). The Reference Manual primarily provides detailed descriptions of each of the more than 100 SVGACC library functions. Each entry includes a function prototype, descriptions of input and output parameters, usage notes, see-also, and detailed example code fragments. An appendix provides complete wiring schematics for standard PC analog joystick prots.

Since SVGACC is marketed as shareware, you must register with Zephyr Software after a 30 day evaluation period. Registration is only $35 for the first copy and $5 for upgrades. Registration entitles you to unlimited runtime distribution rights. Registered users also receive several other benefits:

Source code for SVGACC is not available in any release.

(CUG 434) XYZ++ 3-D Graphics

Nicholas Centanni (Los Gatos, CA) submits his 3-D graphics class library for Borland C++ 3.1 (and later). XYZ++ is a comprehensive package of optimized C++ classes for both floating point and fixed point 3D graphics.

XYZ++ is shipped with the following 3D mathematics classes:
ViewerPerforms all 3D calculations to define a scene.
VectA small vector mathematics class used by both the Viewer and Light classes.
d_LightA surface shading calculator (double values).
f_LightA surface shading calculator (fixed point).

In addition, the DOS BGI programs use their own group of classes:
GraphicsA BGI-specific high-level graphics class.
PanelClasses for building GUI control panels.
MouseA complete graphical mouse support class.
KeyboardAn extended-keyboard support class.
TimerA simple high-resolution timer class.
SceneA demonstration of packaging XYZ++ with the supplied Graphics class.

XYZ++ version 2.0 object code (as released on 07/21/94) is immediately available as CUG volume #434.

The XYZ++ package is divided into two distinct segments. The first is a group of classes which only perform 3D mathematics, without reference to, or dependence on, any specific method of graphics output. And the second deals with the output and display of graphics using Borland's BGI drivers, but without any specific reference to 3D mathematics.

The system is segmented in this way in order to allow developers to cleanly replace the supplied graphics classes with those of their own, without disturbing the 3D mathematics functionality of the package. The system can then be easily connected to any graphics library, or graphics engine that the developer wishes to use.

XYZ++ documentation consists of a 40-page ASCII Reference Manual. The manual defines and reviews many 3-D concepts, though some additional study may be necessary for if this is your first 3-D application.

Since XYZ++ is marketed as shareware, you must register with its author after a 30 day evaluation period. Registration is only $47 and entitles you to full source code as well as unlimited runtime distribution rights. Registered users also receive several other benefits:

(CUG 435) VESATEST: Demos SVGA and .VOC/.WAV audio

Jason Hughes (Abilene, TX) submits his VESA SVGA graphics demonstration that includes many other programming elements essential to writing MS-DOS games. The graphics demonstrations take you through many fast-moving animations that show off the VESA 640x480x256 color display mode. I was particularly impressed with its speed even on my slow 80386DX-20Mhz CPU. Additional graphics routines show off the virtual paging capabilities of SVGAs with more than 1MB RAM onboard. The CUG Library distribution of VesaTest includes full source code in Borland C++ v3.1 along with MS-DOS executables. VesaTest version 2 (as released on 07/20/94) is immediately available as CUG #438.

In addition to fast graphics, VesaTest includes integrated routines for full digitized sound support. This allows playback of both MS Windows .WAV and SoundBlaster .VOC files. The playback routines use with double-buffering and DMA/IRQ detection so that configuration is fully automatic.

Also in this package are mouse routines which intercept mouse interrupts with full support for 2-button and 3-button mice. 2-button users can simulate the middle button by pressing left and right buttons simultaneously. This gives the developer more freedom to use mouse buttons. The latest version also allows automatic mouse acceleration for those mouse drivers that don't yet provide it.

VesaTest doesn't include any documentation other than a brief explanatory README file. However, the comments in the code should be enough to give you a basic idea of what's happening. Hughes has released VesaTest as "tagware", which means that if you use then you are asked to put a tag line in your program's title screen. His notes also indicate he would like to receive postcards in lieu of registration fees.

(CUG 436) INCON:INput CONtrol library

Richard Zigler (McBain, MI) submits his INput CONtrol (INCON) library for developing sophisticated data input screens in MS-DOS applications. INCON gives you control over the placement and appearance of input fields, and the type and amount of data that each will accept. Input fields may be alphanumeric, uppercase, integer, or floating-point. The INCON library support Borland Turbo C 2.01 (or later) and will build Compact, Small, Medium, or Large memory model versions. INCON version 3.1 (as released on 10/08/94) is immediately available as CUG #436

You may pass a string to INCON and specify that it be treated as default input, an input template, or both. Templates may be alpha, numeric, or mixed. You may specify that fields scroll, that they be delimited, that user input be hidden, and that input be returned to your program left- or right-justified or centered in a field whose width and "pad" character you select. A number of reserved edit keys give users of your programs extensive input editing capabilities. Several assembly language string-handling routines are available as part of INCON and in a separate object file.

The basic operation of the program is as follows:

  1. The calling routine defines a block of parameters, among which is a far pointer to an i/o buffer.
  2. At entry, INCON copies any string in the i/o buffer to an internal work buffer and may then display it as default input or use it to construct an input template, or both.
  3. User keyboard entries are examined. INCON acts upon its reserved keys immediately. It returns extended-key codes that it finds in a list provided by the calling routine and cancels the input operation. It displays and saves in the work buffer all entries that are appropriate to the field type; it discards all others.
  4. If the operation succeeds, INCON copies user input to the i/o buffer, overwriting its previous contents. If it fails or is canceled, INCON discards any user input it has so far gathered.
  5. INCON returns a code to the calling routine that indicates input status or whether the user has made a special request.

The INCON documentation consists of a 26-page reference and tutorial manual. The manual appears as an ASCII file formatted out to 66 lines/page. The documentation provides in-depth information on all parameters and data structures you need to use. Additionally, a well-documented demonstration program also makes its easy to learn.

Since Zigler has committed INCON to the public domain, there are no fees required for its use. The CUG Library edition includes full source code in C and ASM files. Demonstration MS-DOS executables are also included.

(CUG 437) C/C++ Exploration Tools for Windows

C/C++ Exploration Tools for Windows, by Juergen Mueller (Kornwestheim, Germany), includes both his C Function Tree Generator (CFT) and the C Structure Tree Generator (CST). CFT and CST analyse the C/C++ source code of applications of any size with multiple files. CFT and CST are useful to explore new, unknown software and to support re-use, maintenance and re-engineering. By preprocessing, scanning, and analysing the program source code, these programs generate the function call hierarchy (CFT) and the data structure/class (CST) relations. Both programs can handle C and C++ code, CFT can additionally analyse assembler code. The C Exploration Tools for Windows executables (released 09/11/94) are immediately available as CUG volume #437.

The C Exploration Tools are shareware and require registration with the author if you decide to use them beyone the 30 day evaluation period. The registration price is $46 U.S. or 60 DM for a single copy. Generous site license discounts with prices as low as $15 are appropriate for corporate use or educational institutions. Registered users of the MS Windows version automatically receive the Win32s version that can be used with Windows NT or Windows 3.1 and Win32s drivers. Source code for the C Exploration Tools is not available.

The C Exploration Tools for Windows version 1.04 is functionally identical to the C Exploration Tools for MS-DOS version 2.30 (see CUG #391). However, the Windows version also allows you to configure the increasingly complex set of options via the GUI (see Fig. 1) and also captures textual output in a scrolling window. Please note that you must register the MS-DOS and Windows versions separately.

(CUG 438) stelnet: Serial Telnet for DOS

Riku Saikkonen (Finland) submits his telnet client for MS-DOS which uses the serial port as the I/O device. Although designed for Bulletin Board System (BBS) applications, STELNET works equally well without any BBS software. STELNET requires a FOSSIL driver and the Waterloo TCP library. It supports binary mode telnet (8-bit), and a '8-bit clean mode', in which all 256 characters are cleanly transferred in both directions. STELNET does not do any terminal emulation of its own; it should never change the data transferred (except where protocol requirements designate).

STELNET conforms to the "conditionally compliant" definition of telnet client as specified in RFC 1123. The telnet code uses the Waterloo TCP library (WATTCP), which uses a packet driver. WATTCP is not included in this volume but is freely available at Any network adapter with a packet driver should work. SLIP should work, at least with the EtherSLIP packet driver.

STELNET is distributed under the GNU General Public License, Version 2, and thus includes source code. Source code is all in C which compiles under Borland C in either Small or Large memory models. STELNET v1.00 (released on 12/20/94) is immediately available as CUG #438.

(CUG 439) XLIB: DOS Extender Library

David Pyles (Jackson, MS) offers his DOS Extender Library for producing Protected Mode MS-DOS applications. XLIB is an assembly language library which greatly simplifies protected-mode programming under Microsoft DOS. With only two calls to XLIB, assembly language programs can utilize the simplicity and power of 32-bit processing. C and C++ programs can harness the powers of 16-bit protected mode using inline assembly. Additionally, the XLIB archive contains a second library call EASYX which allows all high-level languages to gain access to extended memory.

XLIB is designed for the Intel 386, 486, and Pentium processors. XLIB fully utilizes the 32-bit processing powers of these chips and makes these powers available to the user. The compactness of XLIB follows largely from the fact that much of it is written in 32-bit code.

XLIB is marketed as shareware and you may evaluate it for up to 30 days. If you want to distribute applications which incorporate XLIB, then you must register it. Registration is $40 for the basic license and an extra $20 if technical support is desired. It includes an extensive 60-page manual in plain ASCII format as well as sample code. XLIB works with either Borland or Microsoft C environments. XLIB v5.1 (released on 08/25/95) is immediately available as CUG #439.

This page maintained by Victor R. Volkman
Last updated on 2/29/96 (Happy Leap Day)