SUMMARY:
CLIBC_16.LIB - Selected independent near model replacement functions from the standard C (Microsoft C/C++ 7.00) library. Distribution zip file includes sources, Makefile, and limited documentation.

DISTRIBUTION clibc_16.zip CONTENTS:

string\strcpy.asm
string\strlen.asm
string\skipsp.asm
string\skiptosp.asm
string\strcat.asm
string\strcmp.asm
string\strchr.asm
string\strstr.asm
string\strrchr.asm
string\stricmp.asm
string\skipspr.asm
string\skiptosr.asm
string\strlwr.asm
string\strupr.asm
string\strncpy.asm
string\strncat.asm
string\memmove.asm
string\memset.asm
string\memcmp.asm
string\Makefile
string\string.h
string\string.inc
misc\isspace.asm
misc\isalnum.asm
misc\isalpha.asm
misc\isascii.asm
misc\iscntrl.asm
misc\iscsym.asm
misc\iscsymf.asm
misc\isdigit.asm
misc\islower.asm
misc\isupper.asm
misc\isxdigit.asm
misc\Makefile
misc\misc.h
misc\misc.inc
clibc_16.inc
clibc_16.txt
Makefile
Makefile.g

BUILD THE LIBRARY:

UNZIP DISTRIBUTION
Pkzip 2.50 zipped/ compressed the library distribution file. To unzip the library, place the clibc_16.zip file into the desired directory.
pkunzip -d clibc_16.zip
creates and places above listed files/ directories into directory clibc_16
change to directory clibc_16

EDIT MAKEFILE
After unzipping the distribution package, edit Makefile.g (NOT Makefile) as required.
Four configuration options require attention.
DIR_C_INCLUDE
Set to the location to copy the library C include (*.h) files into.  Note, these files will be placed into the clibc_16 subdirectory within DIR_C_INCLUDE. May be identical to DIR_ASM_INCLUDE.
DIR_ASM_INCLUDE
Set to the location to copy the library MASM include (*.inc) files into.  Note, these files will be placed into the clibc_16 subdirectory within DIR_ASM_INCLUDE. May be identical to DIR_C_INCLUDE.
DIRLIB
Set to the location to copy the library (clibc_16.lib) into.
DEBUG=0
Value of 1 builds debug (CodeView DOS) version of library.

RUN NMAKE
Once the files are unziped, and the Makefile.g edited, run
NMAKE clean

Then run
NMAKE
to build and install the library

CLIB_16C.LIB BUILD TOOLS
The library is built (and debugged?) with the following Microsoft development tools:
NMAKE 1.30    (MSVC 1.0 distribution)
MASM 6.14     (MASM 6.11 distribution, updated with ML614.EXE Patch)
MSC/C++ 8.0   (MSVC 1.0 distribution)
LINK 5.50     (MSVC 1.0 distribution)
PWB 2.1.49    (C/C++ 7.0 distribution)
CODEVIEW 4.10 (MSVC 1.0 distribution)
LIB 3.31      (MSVC 1.0 distribution)

Note:
Most tools runs in a Windows9X DOS box.

DOCUMENTATION:
See the Run-Time Library Reference manual for each individual function. Except where noted, clibc_16.lib function parameters and return values are identical.

Some functions in clibc_16 have corresponding Microsoft intrinsic versions. To use the library, disabling automatic intrinsic substitution may be required in some cases.

All functions in clibc_16.lib are near model; Pointers are near, and procedure calls are near. Each function has an exact run time library replacement, and all pointers are offset from ds. Each function with a source near pointer has a _sss version, which indicates the source pointer is offset from ss (Sss). Each function with a destination near pointer also has a _dss version, which indicates the destination pointer is offset from ss (Dss). Each function, where applicable, preserves the es register, for additional compatibility with assembly routines.

Almost all clibc_16 functions have a corresponding __fastcall functions. If there is no corresponding fastcall function, then the fastcall version probably required more clock cycles then the normal version. All fastcall versions save all registers except the return register ax (and dx for 4 byte return values where applicable).

GENERAL:
Independent means that each function included in clibc_16.lib is completely independent of any other function. Most C library functions are dependent on other library functions, computer hardware, BIOS, and may require initialization. Because each clibc_16.lib function is independent, no initialization is required, and each individual function may be included as required in an application. Programmers developing applications requiring independent functions should appreciate clibc_16.lib. Due to the independent nature of each function, only a subset of the standard C library may be implemented. As demand warrants, and/or as they are completed, and/or as they are donated, functions that may be implemented as independent will be added to clibc_16.lib. Contributions gladly accepted, especially sprintf and sscanf.

See clib_16.lib for far model independent functions.

CONTACT INFORMATION:

email:
bkyoung@cwnet.com

Address:
Byron Young
2351 Woodthrush Way
Pleasanton, CA 94566

COPYRIGHT INFORMATION:
All work herein copyrighted by the author. Commercial use and commercial distribution of this library, or any portion, code, documentation, or files, without the prior written permission of the author is prohibited. Library may only be distributed for personal non commercial use in original zip format by the simtel network.

DISCLAIMER
No warranty, expressed or implied, is given concerning the functionality or operability of the code included in this distribution. In fact, many code portions may require debugging.

BUGS
A project of this type will never be bug free. Writing simultaneous, almost identical functions, for two different models (near, far), and two calling conventions (cdecl, fastcall), with different pointer segment offsets always generates some confusion. Bug reports gladly accepted, and are appreciated.

A consistent "bug" concerns segment registers. Some function, to determine if two pointers are equal, directly compare segment registers. Applications using these functions that switch between real and protected mode must be certain that the segment registers are synced with the hidden registers after switching modes. Future versions may correct this 'bug".

REVISIONS
Release_03 09/14/2002 ilibc_03.zip
Major project reorganization; new source directories.
New Makefiles, added new configuration option.
Added .inc files, and separated .h files.
Created MSC7.0 RT library replacement functions.
Created functions with source (and destination) offset from ss.
Created fastcall versions of new functions.
Most new functions require debugging, focusing on segments.
Added test sources to project.

Release_02 09/14/2002 ilibc_02.zip
Fastcall functions debugged.
Numerous bug fixes in other functions.

09/04/2002 ilibc_01.zip
Initial Release.