PRB: Documentation Error in APT & Tiny Model Link Line Example

ID Number: Q67252

6.00 6.00a

MS-DOS

docerr

Summary:

As stated in the Microsoft C version 6.0 README.DOC, page 36 of the

"Microsoft C Advanced Programming Techniques" manual for version 6.0

incorrectly states that to link a tiny model program, you must link in

CRTCOM.OBJ.

Note: You must link with CRTCOM.LIB, not CRTCOM.OBJ.

More Information:

The link line below is an example of other requirements needed to link

a tiny model program. These requirements include putting the

CRTCOM.LIB file before the actual compiled .OBJ file on the link

command line. The effect of putting this library first on the link

line is that the entire library is linked into the output file.

CRTCOM.LIB contains special .COM file startup code, which should be

used instead of the small model startup code in SLIBCE.LIB. This code

must be first because CRTCOM.LIB contains the entry point for the

program, which must be at the beginning of the file (which loads at

100H). If this is not done, the following error message is produced:

LINK : fatal error L2051: start address not equal to

0x100 for /TINY

Because the new executable is named CRTCOM.COM by default, you should

specify a new .COM name. Also, the /NOE switch is necessary because

CRTCOM.LIB replaces the startup code in SLIBCE.LIB.

Link Line Example

-----------------

link /NOE crtcom.lib test.obj,test.exe;

Additional reference words: 6.00 6.00a