|
Top Document: comp.os.msdos.programmer FAQ part 3/5 Previous Document: Next Document: Conclusion See reader questions & answers on this topic! - Help others by sharing your knowledge Date: 8 Feb 2002 20:03:52 -0400 Do you want actual code, or do you want books that explain what's going on? 1) Source code First, check your compiler's run-time library. Many compilers offer functions similar to Microsoft C's _bios_serialcom() or Borland's bioscom(), which may meet your needs. Second, check for downloadable resources at SimTel and Garbo. At SimTel, <http://www.simtel.net/pub/pd/41750.html> (March 1993) is described as "Asynchronous communications library for C"; Garbo has a whole <ftp://garbo.uwasa.fi/pc/> directory. Also, an extended example is in Borland's TechFax TI445, downloadable as part of: <http://www.simtel.net/pub/pd/50843.html> <ftp://garbo.uwasa.fi/pc/c-lang/bchelp10.zip> Though written by Borland, much of it is applicable to other forms of C, and it should give you ideas for other programming languages. Third, SNIPPETS (see <Q:02.08> [What and where is SNIPPETS?]) contains a sample interrupt-driven serial communications library. 2) Reference books Highly recommended: Joe Campbell's {C Programmer's Guide to Serial Communications}, ISBN 0-672-22584-0. He gives complete details on how serial ports work, along with complete programs for doing polled or interrupt-driver I/O. The book is quite thick, and none of it looks like filler. If Campbell's book is overkill for you, you'll find a good short description of serial I/O in {DOS 5: A Developer's Guide}, ISBN 1-55851-177-6, by Al Williams. Finally, a reader has recommended {Serial Communications Programming in C/C++} by Mark Goodwin (ISBN 1-55828-198-3), with source code in the book and on disk. Topics include the basics, various methods of serial communications on the PC (with consideration of high-speed modems), ANSI screen interface, file transfer protocols (Xmodem and Ymodem), etc. There is code in C, and that code is extended into a C++ class for those who use C++. There are also subroutines in Assembly. 3) Downloadable information files A "Serial Port FAQ" is occasionally posted to this newsgroup, and is downloadable as multiple files: <ftp://ftp.phil.uni-sb.de/pub/people/chris/> This directory contains a series of files beginning with Serial_Port. User Contributions: 1 Ben in Seattle ⚠ Jun 2, 2026 @ 4:16 pm Another solution is to use a parallel port loopback plug. It makes the PC think there is a printer attached. The benefit of this is it doesn't require anticipating the problem with ANSI.SYS escape sequences nor does it make you wait half an hour for the "Abort, Retry, Ignore?" prompt, as some versions of DOS do. Comment about this article, ask questions, or add new information about this topic:Top Document: comp.os.msdos.programmer FAQ part 3/5 Previous Document: Next Document: Conclusion Part1 - Part2 - Part3 - Part4 - Part5 - Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: jeffrey@carlyle.org (Jeffrey Carlyle)
Last Update March 27 2014 @ 02:11 PM
|
