SHELL Statement Loses Current Data in Serial Port Input Buffer (37417)
This article was previously published under Q37417
SYMPTOMS
A SHELL statement will empty the input buffer (thus losing data) of
the currently opened serial communications port (COM1 or COM2).
STATUS
Microsoft has confirmed this to be a bug in Microsoft QuickBasic
versions 4.00, 4.00b, and 4.50; in Microsoft Basic Compiler versions
6.00 and 6.00b (buglist6.00, buglist6.00b); and in Microsoft Basic
Professional Development System (PDS) version 7.00 (buglist7.00).
This problem is corrected in Microsoft Basic PDS 7.10 (fixlist7.10) if
you compile with BC /O or run in the QBX.EXE environment. However, if
you compile your program in 7.10 to use the BRT71xxx.EXE run-time
module (in other words, you don't compile with BC /O), you will still
lose data in the communications input buffer because the support for
communications is in the run-time module, and the run-time module is
released from memory during a SHELL to make more room for other
programs to load. This is not a problem; it is a design limitation.
To work around the problem, empty the buffer (such as with the INPUT$
statement) before invoking the SHELL statement to retain information
that would have been lost.
| Modification Type: |
Minor |
Last Reviewed: |
1/9/2003 |
| Keywords: |
KB37417 |
|