🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #632

Re: talking to com port with C

#632
From: Dave Tutelman
Date: Sun, 03 Jun 1990 15:52
30 lines
1651 bytes
In article <2913@hsv3.UUCP> sv@hsv3.UUCP (Steve Verity) writes:
>
>Hi, I need a C routine to talk to a com port.  I am tring to use INT
>14......
>Steve Verity   sv@v7fs1                ...Maxed on MIDI

Wow, Int 14 and MIDI -- WHAT A CONCEPT !!!

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.

At anything above this point, you need to write your own low-level
interrupt-driven handler for the COM port.  If you're really doing
a MIDI program, the 31 Kb/sec rate demands even tighter coding than
the average terminal emulator.

There are books with sample code for this, and some code posted to
the net on occasion.  But you'll probably have to find out about the
workings of your UART chip and program it in assembler.

Good luck!  I've done this, and it's non-trivial.
Dave
+---------------------------------------------------------------+
|    Dave Tutelman						|
|    Physical - AT&T Bell Labs  -  Lincroft, NJ			|
|    Logical -  ...att!pegasus!dmt				|
|    Audible -  (201) 576 2194					|
+---------------------------------------------------------------+
Technical Details
Message-ID: <4811@pegasus.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!dptg!pegasus!dmt
References: <2913@hsv3.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!dptg!pegasus!dmt
From: dmt@pegasus.ATT.COM (Dave Tutelman)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: talking to com port with C
Summary: Forget Int 14
Message-ID: <4811@pegasus.ATT.COM>
Date: 3 Jun 90 15:52:02 GMT
References: <2913@hsv3.UUCP>
Reply-To: dmt@pegasus1.ATT.COM (Dave Tutelman)
Organization: AT&T Bell Labs - Lincroft, NJ
Lines: 30