Path: utzoo!attcan!uunet!samsung!rex!ames!eos!shelby!neon!jkl From: jkl@Neon.Stanford.EDU (John Kallen) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: talking to com port with C Message-ID: <1990Jun10.184313.26276@Neon.Stanford.EDU> Date: 10 Jun 90 18:43:13 GMT References: <4811@pegasus.ATT.COM> <14@csource.OZ.AU> <90160.190621JXS118@psuvm.psu.edu> Organization: Computer Science Department, Stanford University Lines: 32 In article <90160.190621JXS118@psuvm.psu.edu> JXS118@psuvm.psu.edu (Jeff Siegel, Op from Atherton Hall) writes: >>> >>> Steve, >>> Int 14 was written in such a way as to be useless at much above 300 baud. >>> Even a simple program to read from the line and write to the screen >>> will lose characters at 1200 if you use Int 14. >> > >Not true. I have written 2 application in TurboC 2.0 that talk to COM1 using >Int 14 and they run at 4800 BAUD. I haven't seen any problems with character >loss. Had some problem with applications at 9600, but nothing below that. > >This was with ATT PC 6300 BTW, using standard serial ports and ports on >Intel Above board cards. > >Jeff That's because you are running a fast machine. On the good ol'e original PC's and XT's, when the clock runs at 4.77 MHz, you can just barely do serial communication at 1200 baud. In general, it is in general not a good idea to write code that makes assumptions on the underlying hardware being fast enough for your application. I'm sure that one could write a Int14 poller that runs 9600 baud on a '486, but you won't be able to use that on an XT (there are a *lot* of those out there.) An interrupt service routine on IRQ 4 and IRQ 3 works on *any* machine regardless of system speed, and it can handle high baudrates, too. (38.4 kBaud, anyone, anyone? :-) _______________________________________________________________________________ | | | | |\ | | /|\ | John Kallen Computer: kom-pyu'-ter (n) a | |\ \|/ \| * |/ | |/| | | PoBox 11215 device for generating errors | |\ /|\ |\ * |\ | | | | Stanford CA 94309 speedily and unpredictably. _|_|___|___|____|_\|___|__|__|_jkl@neon.stanford.edu___________________________