🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Serial port control?

#5673
From: Adam Goldberg
Date: Tue, 09 Apr 1991 02:44
28 lines
2076 bytes
In article <4790@gumby.Altos.COM>, jerry@gumby.Altos.COM (Jerry Gardner) writes:
>In article <1991Apr8.044312.29004@hubcap.clemson.edu> dawill@hubcap.clemson.edu (david williams) writes:
>>
>>   I've just recently aquired my *own* PC, rather than fooling around
>>with the computers the school so nicely lets me use.  Here's the 
>>question:  How do I set the DTR line inactive after some terminal
>>program has finished with the serial port?  
>
>
>To deassert DTR, write a 0 to bit zero of the serial port's Modem Control
>register.  This register is at I/O port address 0x3fc for COM1 and at
>0x2fc for COM2.  Writing a zero to the register will deassert all of the
>modem control lines.  An example in C follows:
>
>
>	outp(0x3fc, 0);		/* turn off all modem control lines */

Not really a good idea, they might not all get reset to the proper value the
next time you go to use it.  A better idea would be:

        outportb(0x3fc,(inportb(0x3fc) & 0xfe));  /* set bit 0 to 0 */

+----------------------------------------------------------------------------+
+ Adam Goldberg                         Bitnet:   tabu6@ISUVAX.BITNET        +
+ Iowa State University                 Internet: tabu6@CCVAX.IASTATE.EDU    +
+          "It's simple!  Even a Pascal programmer could do it!"             +
+ "Remember: The sooner you fall behind, the more time you have to catch up" +
+----------------------------------------------------------------------------+
Technical Details
Message-ID: <1991Apr9.024404.9824@news.iastate.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!news.cs.indiana.edu!ux1.cso.uiuc.edu!news.iastate.edu!VAXF.IASTATE.EDU!TABU6
References: <1991Apr8.044312.29004@hubcap.clemson.edu>,<4790@gumby.Altos.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!news.cs.indiana.edu!ux1.cso.uiuc.edu!news.iastate.edu!VAXF.IASTATE.EDU!TABU6
From: tabu6@CCVAX.IASTATE.EDU (Adam Goldberg)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Serial port control?
Message-ID: <1991Apr9.024404.9824@news.iastate.edu>
Date: 9 Apr 91 02:44:04 GMT
References: <1991Apr8.044312.29004@hubcap.clemson.edu>,<4790@gumby.Altos.COM>
Sender: news@news.iastate.edu (USENET News System)
Reply-To: tabu6@CCVAX.IASTATE.EDU
Distribution: na
Organization: Iowa State University, Ames, IA.
Lines: 29