🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7540

Re: Serial Communication Question

#7540
From: Marko Kohtala
Date: Fri, 08 Jan 1993 18:30
52 lines
2681 bytes
In <1993Jan7.144009.10363@panther.mot.com> asu@server2.panther.mot.com (Russell Trotter) writes:

>Hello,
> 
>  A few days ago, my boss posted a question needing some info
>on setting up/initializing the com port and read/write howto's.
>After digging through the code we got from replies, we found that the best way 
>to do this was to use some code that would actually access
>the UART?

Yes. If you do not want to access the UART directly, you can get a
FOSSIL device driver that does it for you and use the FOSSIL. Most BBS
programs use this approach.

Two popular FOSSIL device drivers are X00 and BNU. They come with all
the necessary API documentation.

>My question is, what, precisely, are these
>status interrupts for, and are they absoultely necessary?

Receiver Line Status
	Source: Overrun, Parity or Framing error or Break
	Reset: Read the LS register

Modem Status
	Source: Clear to Send or Data Set Ready or Ring Indicator or Data
		Carrier Detect. 
	Reset: Read the MS register

They are not absolutely necessary. Modem Status can be used to
implement hardware flow control: change in Clear to Send causes an
interrupt and if it is set, the interrupt routine should start to
transmit if there is data in the transmit buffer.

Also, for these to work, you must make sure that the interrupt
conditions are reset. The thing to do to reset is shown above. If you
do not reset the interrupt, it will stay on and there will not be
another interrupt on AT bus. In MCA I think it will cause the
interrupt handler to be called constantly untill the interrupt is
reset thus hanging the machine.

Received Data interrupt can be reset by reading the Receive Buffer
register. Transmitter Holding Register Empty interrupt can be cleared
by reading IIR or writing to THR.

If you have any problems, I am willing to write you a tailored comm's
module for a reasonable compensation. I have written the one used in
Telemate communications program. 
-- 
---
Marko Kohtala - INTERNET:Marko.Kohtala@hut.fi, mkohtala@otax.tky.hut.fi
Student at (not representative of) the Helsinki University of Technology
Technical Details
Message-ID: <mkohtala.726517845@vipunen.hut.fi>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!vipunen.hut.fi!mkohtala
References: <1993Jan7.144009.10363@panther.mot.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!vipunen.hut.fi!mkohtala
From: mkohtala@lesti.hut.fi (Marko Kohtala)
Subject: Re: Serial Communication Question
Message-ID: <mkohtala.726517845@vipunen.hut.fi>
Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
Nntp-Posting-Host: lesti.hut.fi
Reply-To: Marko.Kohtala@hut.fi
Organization: Helsinki University of Technology, Finland
References: <1993Jan7.144009.10363@panther.mot.com>
Date:  8 Jan 93 18:30:45 GMT
Lines: 52