Home > Commands N-Z > Configuration S

STACKS


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Supports the dynamic use of data stacks to handle hardware interrupts. You can use this command only in your CONFIG.SYS file.


Syntax

STACKS=n,s


Parameters
n (v2.0)
Specifies the number of stacks. Valid values for n are 0 and numbers in the range 8 through 64.
s (v2.0)
Specifies the size (in bytes) of each stack. Valid values for s are 0 and numbers in the range 32 through 512.

Switches

none.


Related

For information about COMMAND.COM switches, see the COMMAND command.


Notes

Default settings The default settings for the STACKS command are:

Special cases for stack allocation Upon receiving a hardware interrupt, the operating system allocates one stack from the specified number of stacks. When you specify 0 for the n and s values, the operating system allocates no stacks. If the values are 0, each running program must have enough stack space to accommodate the computer's hardware interrupt drivers. Many computers operate correctly, saving some memory for programs, with n and s values of 0. If, however, your computer becomes unstable when you set these values to 0, return to the default values.

Increasing the value of STACKS If the STACKS values are not equal to 0,0 and you see a "Stack Overflow" or "Exception error 12" message, increase the number or size of the stacks.


Examples

To allocate 8 stacks of 512 bytes each for hardware-interrupt handling, add to your CONFIG.SYS file:

    STACKS=8,512

Errorlevels

none.


Availability
External
DOS
v2.0 v2.01 v2.05 v2.10 v2.11 v2.11R v2.12 v2.2 v2.25 v3.0 v3.20 v3.05 v3.1 v3.21 v3.25 v3.30 v3.3A v3.3R v3.3T v3.31 v3.40 v4.0 v4.01 v4.01A v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23 v7.00 v7.0R1 v7.10 v8.00
Windows
none
Windows NT
none