Losing Characters with COM1: Communications in Macintosh BASIC (33087)
The information in this article applies to:
- Microsoft QuickBASIC 1.0
- Microsoft BASIC Compiler
- Microsoft BASIC Interpreter for Apple Macintosh 2.0
- Microsoft BASIC Interpreter for Apple Macintosh 2.1
- Microsoft BASIC Interpreter for Apple Macintosh 3.0
This article was previously published under Q33087 SUMMARY
Macintosh BASIC cannot detect input buffer overrun when receiving
input from the COM1: communications device. As a consequence, at 1200
baud and faster, it is possible to lose input characters. The
following are some methods to alleviate the problem of losing
characters at 1200 baud or faster:
- Use a baud rate of 300.
- Increase the buffer size using the LEN=file-buffer-size argument in
the OPEN COM1: statement.
- Do not perform much screen input and output while receiving input
from the COM1: communications device.
- Make your program code as fast as possible in-between inputs from
the COM1: communications device. The following should be done to
increase the speed of the code:
- Use the DrawText library routine instead of the PRINT statement.
DrawText is faster than PRINT because it sends out one string of
characters at a time instead of one character at a time.
(DrawText is not supported with Microsoft BASIC Interpreter
Versions 2.00 and 2.10.)
- Use textmode 0 (COPY mode). It can increase text display speed
by up to 20 percent compared to other textmodes.
- Use the SELECT CASE statement instead of doing a series of IF
THEN ELSE statements to increase the speed of the code. (SELECT
CASE is not supported in the Microsoft BASIC Interpreter
Versions 1.x, 2.00, 2.10, or 3.00, but is supported in the
QuickBASIC Version 1.00 interpreter and compiler, and in BASIC
compiler Version 1.00 for Macintosh.)
An example communications program called TERMINAL is provided on the
release disk for BASIC interpreter, compiler, and QuickBASIC for
the Macintosh.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB33087 kbAudDeveloper |
---|
|