Syntax: /STACKDOS:nnnn
This option sets the size of the stack in the DOS header. The field nnnn contains the stack size in bytes. This option is equivalent to the Control Stack Size (/ST) (in LINK). DOS modules have a maximum stack size of 65,535.
Almost all OS/2 applications have a DOS header and DOS stub. The DOS stub normally is found in 3 forms. The first stub type is the LINK386 default stub. This is a small DOS program that simply prints an error message of the form "This program cannot be run in a DOS session." and exits. The second common stub type is a FAPI (Family API) program. This allow the applications to be run equally from a real DOS machine, an OS/2 or Windows DOS box, or from an OS/2 protected mode session. Many of the OS/2 system utilities are written with FAPI. The third stub type is that of a fully independant DOS application preceding the OS/2 binary image, allowing the two programs to share the same executable module. These DOS stubs are attached to the OS/2 module by using the STUB statement within a LINK386 .def file.
You can specify nnnn in decimal, hexadecimal, or octal radix using standard C language notation. For instance, a DOS stack size of 4,096 bytes can be expressed as any of the following:
Compare to /STACKOS2.
DO NOT USE /STACK
There is an old EXEHDR option /STACK that performed a function similar to /STACKDOS and /STACKOS2 combined. The /STACK option has serious limitations and has the potential to corrupt the header of an executable module. It it very strongly recommended that you do not use /STACK, and begin using /STACKDOS and /STACKOS2 instead.