The information in this article applies to:
SUMMARY
The are programming situations in which it is necessary to determine the
length of a program at run-time. For example, services (such as MS-DOS
function 31H) need this information. Ordinarily, one could define a symbol
at the end of a segment known to be loaded last; however, this does not
work when linking with libraries because the libraries load after the
.OBJ's.
In the above, LASTSEG is the last segment in the load order (assuming all
other segments in the program belong to either class CODE or DATA) and thus
marks the beginning of free memory above the load image.
If your segment declarations occur randomly throughout your source files and libraries, the solution is not as simple. The method to use is to make a new library, to be linked in last, that defines this last empty segment and a label in this segment. (You must have a reference to this label in some part of the program so the linker will pull in this library.) Additional query words: 1.25 1.27 3.0x 4.00 5.00 5.10 6.00
Keywords : |
Last Reviewed: January 4, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |