QB Program Can Hang if Coprocessor Switch Is Set Incorrectly (32098)



The information in this article applies to:

  • Microsoft QuickBASIC 4.0b
  • Microsoft QuickBASIC 4.5
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b

This article was previously published under Q32098

SUMMARY

QuickBasic versions 4.0b and 4.5 for MS-DOS, and programs compiled with Microsoft Basic Compiler versions 6.0 and 6.0b for MS OS/2 and MS-DOS or its copy of QuickBasic, detect the presence or absence of a math coprocessor differently than QuickBasic version 4.0 does.

QuickBasic version 4.0 loads and runs on a standard IBM PC even when the coprocessor switch on the PC motherboard is incorrectly set to indicate the presence of a math coprocessor when one is not actually present. Programs run in QuickBasic versions later than 4.0 (in the QB.EXE editor or from an executable .EXE program) will hang under these same conditions.

If you suspect that the hardware switch for the coprocessor is set incorrectly, type the following DOS command to turn off coprocessor checking and try the program again:
   set NO87="Coprocessor has now been disabled."
				
If the program now runs without hanging, then the hardware switch for the coprocessor is probably incorrectly set to indicate that a coprocessor is installed when one is not actually present. Another possibility is that the installed coprocessor incorrectly has a speed (megahertz) rating faster than the CPU (central processing unit) -- the coprocessor's speed must be equal to or less than the speed of the CPU.

MORE INFORMATION

Some customers have reportedly run QuickBasic version 4.0 without problems on older PCs and did not realize that the hardware switches were set incorrectly until they tried the QuickBasic version 4.0b upgrade, when their machines hung.

According to one customer, his original IBM documentation listed the coprocessor switch as unused, and two of his machines came from IBM with the switches set in what is now considered the incorrect position.

One customer with an "original" PC 1 from IBM (with a BIOS dated 10-27-1982, and 16/64K stamped on the motherboard) found that the IBM PC documentation was wrong for Switch Block One on the PC system board. Switch number 2 must be ON in Switch Block One for a computer that has no coprocessor.

Please refer to page 457 of the following book for a correct list of all switch settings for the IBM PC:

"The Programmer's PC Sourcebook," Thom Hogan. Microsoft Press, 1988.

This book contains reference tables for IBM PCs and compatibles, PS/2 machines, and MS-DOS.

According to one customer, if your coprocessor is defective, QB.EXE may hang independent of the setting of the NO87 DOS environment variable. You can check for a defective coprocessor by using a PC diagnostics utility.

Modification Type:MinorLast Reviewed:1/8/2003
Keywords:KB32098