BUG: Using Overlays and 85-90 Segments Causes Hang (94081)



The information in this article applies to:

  • Microsoft Basic Professional Development System for MS-DOS 7.1
  • Microsoft Basic Professional Development System for MS-DOS 7.0

This article was previously published under Q94081

SYMPTOMS

A compiled program that uses overlays and the run-time module may hang if the number of segments in the program is in the range of 85-90. This problem also occurs with Stand-alone projects.

WORKAROUND

To work around this problem, add 3-6 named common blocks or modules to the program.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft Basic Professional Development System (PDS) for MS-DOS, versions 7.0 and 7.1. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

You can check to see how many segments are in a program by linking your program with the /INF option. For example:

LINK /INF main (mod1) (mod2) (mod3);

LINK prints a line of "SegmentsNNN" which lists how many segments are in the program. If this number is approximately 85-90, try increasing or decreasing the number of segments to work around this problem.

The following methods can be used to increase the number of segments in your program:

  1. Add a few named common blocks. Each named common block gets an individual segment. The following example adds three new segments to a program:
       COMMON /Test1/ X%
       COMMON /Test2/ Y%
       COMMON /Test3/ Z%
    						
  2. Add more modules to the program. You can move some existing procedures into 3 or 4 new modules. Each new module creates a new segment in the program. This workaround does not add any extra variables to the program.
Usually, increasing the number of segments to about 92-95 resolves this problem.

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:kbbug KB94081