KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q46745: What the /HIGH and /DS Linker Options Do

Article: Q46745
Product(s): See article
Version(s): 3.65
Operating System(s): MS-DOS
Keyword(s): ENDUSER | SR# G890607-19979 | mspl13_basic
Last Modified: 13-JUL-1989

Question:

I would like information on the /HIGH and /DS options of the linker.
Specifically, what changes are needed in the .EXE file to tell the
loader to put it high?

Response:

Basically, these are hold-over features from DOS Version 1.00 and from
the original Microsoft/IBM Pascal and FORTRAN Compilers -- they're of
little or no use under DOS 2.00 and later. Specifically, programs
linked with the /HIGH switch are allocated all of the memory in the
machine and cannot release unneeded memory back to DOS; therefore, no
other program can be loaded into memory.

The /HIGH switch sets both the minalloc and maxalloc fields in the .EXE
header to zero. This combination of values causes the loader to load
the program in high memory.

/DSALLOCATE (or /DS) causes DGROUP to be "shifted" upwards so that the
high address in the group is always FFFFh. Offsets into DGROUP are
adjusted appropriately.

These switches are strictly incompatible with our current high-level
languages -- the only possible use for them is in a MASM program.
Microsoft doesn't recommend using them at all unless you know
precisely what you're doing.

There is good documentation on what the /HIGH and /DSALLOCATE switches
do, as well as how the loader works, in the "MS-DOS Encyclopedia,"
starting on Page 719. (This excellent reference manual is now less
expensive and available in paperback).

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.