TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Gerry Strano
from: Roy McNeill
date: 1994-06-08 19:20:18
subject: C PROGRAMMING THE RS-232C

On (02 Jun 94) Gerry Strano wrote to All...



 GS> Has anybody programmed the RS-232C for i/o operations using c or c++.

 GS> Can you give me some hints. Use assembler source too or not?

 GS> Use Bios or Dos library functions. ect...

 GS> What is the easiest way to do it?



My tiny opinion: easiest way is None of the Above... Avoid the

dos and bios functions unless you are doing slow comms with a fast

pc, as they provide no receive buffering.



If you're overstocked with money, buy a commercial comms library.

Lots of bells and whistles, too many maybe, and fairly easy to use

in simple setups. Our company bought the Greenleaf comms lib years

ago, and with it I built a couple of specialized apps that are

still in use.



If you're not (like most of us!), look up one of the shareware

Fossil comms drivers, like BNU or X00. Loaded as a TSR, a fossil

(yeah, I know, stupid name, I guess it was inherited from Unix)

will sit between your C program and the serial port. It will handle

the interrupts and the handshaking, and set up tx and rx buffers

for you. You specify the various options as parameters to the

fossil program when you load it. Your program interfaces to the

fossil using Dos interrupt calls, which look fairly horrible at

first sight, but are surprisingly easy to use.



Good hunting



Cheers



--- PPoint 1.80


SD®¯_ü*
* Origin: Silicon Heaven (3:711/934.16)
SEEN-BY: 711/809 934
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.